/* ============ Токены ============ */
:root {
  --font-d: 'Unbounded', system-ui, sans-serif;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-xl: 32px; --r-lg: 24px; --r-md: 18px; --r-sm: 12px;
  --violet: #ff3d81; --pink: #ec4899; --lime: #c3f53c; --cyan: #22d3ee; --orange: #fb923c;
  --red: #f43f5e; --green: #22c55e; --amber: #f59e0b;
  --grad: linear-gradient(135deg, #ff3d81 0%, #ff6a3d 58%, #ffae3a 100%);
  --grad-2: linear-gradient(135deg, #ffd23f, #ff8a3d);
  --grad-3: linear-gradient(135deg, #c3f53c, #22d3ee);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --header-h: 72px;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --bg-2: #f8fafc;
  --surface: #ffffff; --surface-2: rgba(15, 23, 42, .04); --surface-3: rgba(15, 23, 42, .08);
  --solid: #ffffff; --border: #e2e8f0; --border-2: #cbd5e1;
  --text: #0f172a; --muted: #64748b; --faint: #94a3b8;
  --shadow: 0 20px 40px -15px rgba(0, 0, 0, .07);
  --blob-o: .16;
  --ok-bg: rgba(34, 197, 94, .12); --ok: #15803d;
  --bad-bg: rgba(244, 63, 94, .10); --bad: #be123c;
  --warn-bg: rgba(245, 158, 11, .12); --warn: #b45309;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0a0b; --bg-2: #151013;
  --surface: rgba(255, 255, 255, .045); --surface-2: rgba(255, 255, 255, .075); --surface-3: rgba(255, 255, 255, .12);
  --solid: #1a1416; --border: rgba(255, 255, 255, .085); --border-2: rgba(255, 255, 255, .16);
  --text: #fbf4f2; --muted: #b0a2a5; --faint: #6e5f63;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --blob-o: .6; --on-accent: #fff; --on-lime: #12140a;
  --ok-bg: rgba(34, 197, 94, .14); --ok: #4ade80;
  --bad-bg: rgba(244, 63, 94, .14); --bad: #fb7185;
  --warn-bg: rgba(245, 158, 11, .15); --warn: #fbbf24;
}

/* ============ База ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.5; min-height: 100dvh; overflow-x: hidden;
  transition: background-color .5s var(--ease), color .3s;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 12% 8%, rgba(255, 61, 129, .38), transparent 60%),
    radial-gradient(32vmax 32vmax at 92% 12%, rgba(255, 138, 61, .30), transparent 60%),
    radial-gradient(40vmax 40vmax at 60% 100%, rgba(195, 245, 60, .16), transparent 60%);
  opacity: var(--blob-o); animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3vmax, -2vmax, 0) rotate(5deg); } }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-d); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }
.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.spacer { flex: 1; }
::selection { background: rgba(255, 61, 129, .4); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

/* ============ Шапка (Верхняя плашка как на скринах) ============ */
.topbar {
  position: sticky; top: 0; z-index: 90; height: var(--header-h);
  background: var(--solid);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: background-color .3s var(--ease), border-color .3s, box-shadow .3s;
}
.topbar.scrolled {
  box-shadow: 0 8px 30px -10px rgba(0, 0, 0, 0.08);
}
.topbar-in {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.03em;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 17px; transform: rotate(-6deg);
  box-shadow: 0 6px 18px -4px rgba(236, 72, 153, .5); transition: transform .35s var(--spring);
}
.logo:hover .logo-mark { transform: rotate(6deg) scale(1.06); }
.logo-word i { color: var(--pink); font-style: normal; }

/* Основная навигация */
.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav-item {
  position: relative;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.nav-link:hover, .nav-item.open > .nav-link {
  color: var(--violet);
  background: var(--surface-2);
}
.chevron-ico {
  width: 14px;
  height: 14px;
  transition: transform .2s var(--ease);
  color: var(--muted);
}
.nav-item:hover > .nav-link .chevron-ico,
.nav-item.open > .nav-link .chevron-ico {
  transform: rotate(180deg);
  color: var(--violet);
}

/* --- Мега-меню (скрины 1–4) --- */
.mega-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--solid);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  box-shadow: 0 24px 70px -15px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  display: none;
  min-height: 380px;
  z-index: 1000;
  overflow: hidden;
  animation: menuIn .2s var(--ease);
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-item.has-mega:hover .mega-menu,
.nav-item.has-mega.open .mega-menu {
  display: flex;
}

/* Колонки мега-меню */
.mega-col {
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 480px;
  overflow-y: auto;
}
.mega-col-categories {
  width: 185px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.mega-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
}
.mega-cat-item .chevron-r {
  width: 14px;
  height: 14px;
  color: var(--muted);
  opacity: .8;
  transition: transform .15s;
}
.mega-cat-item:hover {
  background: var(--surface-2);
  color: var(--violet);
}
.mega-cat-item:hover .chevron-r {
  transform: translateX(2px);
  color: var(--violet);
}
/* Активный оранжевый маркер как на скринах */
.mega-cat-item.active {
  background: #fff3ea;
  color: #ea580c;
  font-weight: 700;
}
[data-theme="dark"] .mega-cat-item.active {
  background: rgba(234, 88, 12, 0.20);
  color: #fb923c;
}
.mega-cat-item.active .chevron-r {
  color: #ea580c;
}
[data-theme="dark"] .mega-cat-item.active .chevron-r {
  color: #fb923c;
}

.mega-col-footer {
  margin-top: auto;
  padding-top: 14px;
}
.mega-all-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.mega-all-btn:hover {
  border-color: var(--violet);
  color: var(--violet);
  background: var(--surface-2);
  transform: translateY(-1px);
}

/* Колонка 2 (Классы или прямой список предметов) */
.mega-col-sub {
  width: 175px;
  border-right: 1px solid var(--border);
}
.mega-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
}
.mega-sub-item .chevron-r {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.mega-sub-item:hover {
  background: var(--surface-2);
  color: var(--violet);
}
.mega-sub-item.active {
  background: #fff3ea;
  color: #ea580c;
  font-weight: 700;
}
[data-theme="dark"] .mega-sub-item.active {
  background: rgba(234, 88, 12, 0.20);
  color: #fb923c;
}

/* Колонка 3 (Предметы) */
.mega-col-subjects {
  width: 220px;
}
.mega-subject-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: all .15s;
}
.mega-subject-item:hover {
  background: var(--surface-2);
  color: var(--violet);
  padding-left: 15px;
}

/* Простые дропдауны («Бесплатно», «О нас», скрин 5) */
.simple-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background: var(--solid);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  animation: menuIn .2s var(--ease);
}
.nav-item.has-dropdown:hover .simple-dropdown,
.nav-item.has-dropdown.open .simple-dropdown {
  display: flex;
}
.dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all .15s;
}
.dd-item .dd-ico {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--violet);
}
.dd-item .ic {
  width: 16px;
  height: 16px;
}
.dd-item:hover {
  background: var(--surface-2);
  color: var(--violet);
  transform: translateX(2px);
}

/* Правая часть шапки */
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Кнопка «Выбрать предметы» со скрина */
.btn-topbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 10px;
  background: #5046e5;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(80, 70, 229, 0.35);
  transition: transform .2s var(--spring), box-shadow .2s;
  white-space: nowrap;
}
.btn-topbar-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(80, 70, 229, 0.45);
  background: #4338ca;
}

/* Телефон со скрина */
.topbar-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .15s;
}
.topbar-phone .ic {
  width: 16px;
  height: 16px;
  color: var(--violet);
}

.nav-item.has-mega::after,
.nav-item.has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}

.topbar-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.topbar-login-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  color: var(--violet);
}
.topbar-login-btn .ic {
  width: 16px;
  height: 16px;
}

.topbar-phone:hover {
  color: var(--violet);
  background: var(--surface-2);
}

/* Кнопка смены темы и мобильного меню */
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .2s var(--spring), background .15s;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:hover {
  transform: translateY(-1px);
  background: var(--surface-2);
  border-color: var(--border-2);
}
.theme-btn span {
  position: absolute;
  transition: transform .4s var(--spring), opacity .25s;
}
[data-theme="dark"] .ti-sun, [data-theme="light"] .ti-moon {
  transform: translateY(24px) rotate(90deg);
  opacity: 0;
}
.mobile-menu-btn {
  display: none;
}
.mobile-menu-btn .ic-close {
  display: none;
}
.mobile-menu-btn.is-open .ic-menu {
  display: none;
}
.mobile-menu-btn.is-open .ic-close {
  display: block;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--grad-3);
  color: var(--on-lime);
  cursor: pointer;
  transition: transform .2s var(--spring);
}
.avatar:hover { transform: scale(1.06); }

/* Мобильная шторка меню */
.mobile-drawer {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--solid);
  z-index: 85;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  animation: drawerIn .25s var(--ease);
}
@keyframes drawerIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-drawer-in {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mob-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mob-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.mob-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
  transition: all .15s;
}
.mob-link:hover {
  background: var(--surface-2);
  color: var(--violet);
  border-color: var(--border-2);
}
.mob-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
}

@media (max-width: 980px) {
  .nav-main { display: none; }
  .mobile-menu-btn { display: grid; }
  .btn-topbar-cta { display: none; }
  .topbar-phone .phone-txt { display: none; }
}

/* ============ Кнопки и чипы ============ */
.btn {
  --bh: 46px; height: var(--bh); padding: 0 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px; white-space: nowrap; position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface-2); border: 1px solid var(--border); transition: transform .3s var(--spring), box-shadow .3s, background .2s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 30px -10px rgba(236, 72, 153, .7); }
.btn-primary::after, .btn-lime::after {
  content: ''; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transition: transform .7s var(--ease);
}
.btn-primary:hover::after, .btn-lime:hover::after { transform: translateX(120%) skewX(-20deg); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(236, 72, 153, .85); }
.btn-lime { background: var(--lime); color: var(--on-lime); border: 0; box-shadow: 0 10px 30px -12px rgba(195, 245, 60, .7); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ok { background: var(--green); color: #fff; border: 0; }
.btn-bad { background: var(--bad-bg); color: var(--bad); border: 1px solid transparent; }
.btn-lg { --bh: 56px; padding: 0 28px; font-size: 16px; }
.btn-sm { --bh: 36px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); letter-spacing: .01em; }
.pill-glow { background: color-mix(in srgb, var(--pink) 16%, transparent); border-color: color-mix(in srgb, var(--pink) 35%, transparent); color: color-mix(in srgb, var(--pink) 60%, var(--text)); }
.chip {
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; background: var(--surface); border: 1px solid var(--border);
  transition: all .25s var(--ease); display: inline-flex; gap: 6px; align-items: center;
}
.chip:hover { border-color: var(--border-2); transform: translateY(-1px); }
.chip.active { background: var(--text); color: var(--bg); border-color: transparent; }

.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-pending { background: var(--warn-bg); color: var(--warn); }
.st-pending::before { animation: pulse 1.6s infinite; }
.st-revision, .st-failed, .st-overdue { background: var(--bad-bg); color: var(--bad); }
.st-accepted, .st-passed, .st-done { background: var(--ok-bg); color: var(--ok); }
.st-new { background: var(--surface-2); color: var(--muted); }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }

/* ============ Bento ============ */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 26px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .45s var(--ease), border-color .3s, box-shadow .4s;
}
.spot::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 61, 129, .16), transparent 45%);
}
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; z-index: 1; }
.tile.hover-lift:hover { transform: translateY(-4px); border-color: var(--border-2); }
.tile h3 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tile-head h3 { margin: 0; }

/* Появление */
.view { animation: viewIn .6s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(18px) scale(.99); filter: blur(6px); } }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }

/* Стикеры */
.sticker {
  position: absolute; z-index: 3; padding: 10px 16px; border-radius: 16px; font-family: var(--font-d); font-weight: 700; font-size: 13px; line-height: 1.2;
  background: var(--lime); color: var(--on-lime); border: 3px solid #fff; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .4);
  transform: rotate(var(--rot, -8deg)); animation: float 5s ease-in-out infinite; text-align: center;
  transition: transform .4s var(--spring);
}
.sticker:hover { transform: rotate(0) scale(1.1); }
@keyframes float { 50% { translate: 0 -10px; } }

/* ============ Hero ============ */
.hero { padding-top: 28px; }
.hero-main { padding: 48px; min-height: 460px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.display { font-size: clamp(34px, 5.3vw, 68px); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-text.g2 { background-image: var(--grad-2); }
.grad-text.g3 { background-image: var(--grad-3); }
.lead { font-size: 18px; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.social-proof { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.social-proof b { color: var(--text); }
.avatars { display: flex; }
.avatars span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--solid); border: 2px solid var(--bg); margin-left: -10px; font-size: 18px; border-radius: 12px; }
.avatars span:first-child { margin-left: 0; }
.hero-main .sticker { right: 34px; top: 34px; --rot: 9deg; }
.hero-art { background: var(--grad); border: 0; display: flex; flex-direction: column; justify-content: flex-end; min-height: 460px; color: #fff; }
.hero-art .orb { position: absolute; width: 340px; height: 340px; border-radius: 50%; top: -60px; right: -80px; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%); filter: blur(4px); animation: float 7s ease-in-out infinite; }
.score-big { position: absolute; inset: 0 0 18% 0; display: grid; place-items: center; font-family: var(--font-d); font-weight: 800; font-size: clamp(110px, 13vw, 170px); letter-spacing: -.06em; line-height: 1; color: #fff; text-shadow: 0 24px 50px rgba(120, 20, 40, .35); animation: rocket 6s ease-in-out infinite; font-variant-numeric: tabular-nums; }
@keyframes rocket { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(8px, -18px) rotate(4deg); } }
.hero-art-cap { position: relative; z-index: 2; }
.hero-art-cap b { font-family: var(--font-d); font-size: 44px; display: block; line-height: 1; }
.hero-art-cap span { opacity: .85; font-weight: 600; }
.hero-art .sticker { top: 26px; left: 22px; --rot: -10deg; background: #fff; color: #111; border-color: var(--lime); }

.exam-tile { cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 180px; }
.exam-tile .ex-emoji { font-size: 44px; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; background: var(--g); margin-bottom: 10px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); transition: transform .5s var(--spring); }
.exam-tile:hover .ex-emoji { transform: rotate(-10deg) scale(1.08); }
.exam-tile h3 { font-size: 30px; margin: 0; }
.exam-tile .arrow { position: absolute; right: 24px; top: 24px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); transition: transform .4s var(--spring), background .3s; }
.exam-tile:hover .arrow { transform: rotate(-45deg); background: var(--text); color: var(--bg); }
.exam-count { margin-top: auto; font-weight: 700; font-size: 13px; color: var(--muted); }
.feat-tile .big { font-size: 40px; margin-bottom: 10px; display: inline-block; transition: transform .5s var(--spring); }
.feat-tile:hover .big { transform: scale(1.2) rotate(-8deg); }
.feat-tile p { color: var(--muted); font-size: 14px; }
.feat-video { background: radial-gradient(120% 140% at 100% 0%, rgba(255, 210, 63, .18), rgba(255, 61, 129, .1) 60%, transparent 85%), var(--surface); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.mini-player { border-radius: 18px; background: #0d0d16; aspect-ratio: 16/10; position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); }
.mini-player::before { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 28px; background: radial-gradient(circle at 70% 30%, rgba(236, 72, 153, .5), transparent 60%), radial-gradient(circle at 20% 80%, rgba(34, 211, 238, .4), transparent 60%); }
.mini-player i { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .2); }
.mini-player i::after { content: ''; position: absolute; inset: 0; width: 30%; border-radius: inherit; background: var(--grad); animation: mini 4s var(--ease) infinite; }
@keyframes mini { 0% { width: 5%; } 100% { width: 95%; } }

/* ============ Секции / каталог ============ */
.section { padding: 112px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.035em; }
.section-head p { color: var(--muted); max-width: 440px; }
.kicker { font-size: 15px; color: var(--violet); font-weight: 700; display: block; margin-bottom: 8px; }
.filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
  width: 100%;
}

.filters-row {
  width: 100%;
}

.filters-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-search-wrap {
  margin-left: auto;
}

.filters-row-chips {
  width: 100%;
  display: block;
}

.seg {
  position: relative;
  display: inline-flex;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  gap: 2px;
  isolation: isolate;
  overflow: visible;
}

.seg button {
  position: relative;
  z-index: 2;
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: color .2s ease;
  user-select: none;
  -webkit-user-select: none;
}
.seg button:hover {
  color: var(--text);
}
.seg button.active {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 44px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all .2s cubic-bezier(.2, .9, .3, 1);
  user-select: none;
  -webkit-user-select: none;
}
.chip:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.chip.active {
  background: var(--text) !important;
  color: var(--bg) !important;
  border-color: var(--text) !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, .28);
  transform: translateY(-1px) scale(1.02);
}
.chip .ic {
  color: var(--violet);
  transition: color .2s ease, transform .2s ease;
}
.chip.active .ic {
  color: var(--bg) !important;
  transform: scale(1.08);
}

/* ============ Перетекающая капелька для экзаменов (Fluid Droplet Indicator) ============ */
#exam-seg .fluid-drop-pill {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  will-change: transform, width, height;
  transform-origin: center center;
  background: var(--grad);
  box-shadow: 0 6px 20px -3px rgba(255, 61, 129, .55), 0 2px 6px -1px rgba(255, 174, 58, .4);
}

.search { margin-left: auto; height: 46px; padding: 0 18px 0 42px; border-radius: 999px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%239c9ab6' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m16 16-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center; border: 1px solid var(--border); min-width: 240px; outline: none; transition: border-color .2s, box-shadow .2s; }
.search:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(255, 61, 129, .18); }
.search:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(255, 61, 129, .18); }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 16px; }
.course-card {
  position: relative; border-radius: var(--r-xl); padding: 22px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; min-height: 330px;
  background: var(--surface); border: 1px solid var(--border); overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease), border-color .3s, box-shadow .5s; animation: cardIn .6s var(--ease) both; animation-delay: calc(var(--i) * 55ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.course-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 150px; background: var(--g); opacity: .95; z-index: -1; transition: height .6s var(--ease); border-radius: 0 0 40% 40% / 0 0 26px 26px; }
.course-card:hover { transform: translateY(-6px) rotate(-.4deg); border-color: var(--border-2); box-shadow: 0 30px 60px -30px rgba(255, 61, 129, .55); }
.course-card:hover::before { height: 165px; }
.cc-top { display: flex; justify-content: space-between; align-items: center; }
.exam-tag { padding: 5px 11px; border-radius: 999px; background: rgba(0, 0, 0, .28); color: #fff; font-weight: 800; font-size: 12px; backdrop-filter: blur(6px); }
.badge { padding: 5px 10px; border-radius: 6px; background: var(--lime); color: var(--on-lime); font-weight: 800; font-size: 11px; text-transform: uppercase; transform: rotate(4deg); }
.badge.owned { background: #fff; color: #111; }
.cc-sticker { font-size: 58px; line-height: 1; height: 74px; margin-top: 2px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .3)); transition: transform .6s var(--spring); transform-origin: left bottom; }
.course-card:hover .cc-sticker { transform: rotate(-10deg) scale(1.12) translateY(-4px); }
.course-card h3 { font-size: 18px; margin-top: 18px; }
.cc-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cc-meta span::before { content: '•'; margin-right: 10px; color: var(--faint); }
.cc-meta span:first-child::before { display: none; }
.cc-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--border-2); }
.cc-price-row { display: flex; align-items: baseline; justify-content: space-between; width: 100%; }
.cc-guar { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.price { white-space: nowrap; }
.price small { color: var(--muted); font-size: 12px; display: block; line-height: 1; }
.price b { font-family: var(--font-d); font-size: 20px; }
.price i { font-style: normal; color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1/-1; }
.empty .big { font-size: 56px; display: block; margin-bottom: 10px; }

/* Тарифы */
.tariffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.tariff { display: flex; flex-direction: column; gap: 16px; }
.tariff .t-emoji { font-size: 34px; }
.tariff h3 { font-size: 26px; margin: 0; }
.tariff ul { list-style: none; display: grid; gap: 10px; font-size: 15px; }
.tariff li { display: flex; gap: 10px; }
.tariff li::before { content: ''; -webkit-mask: var(--check) center / 14px no-repeat; mask: var(--check) center / 14px no-repeat; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--ok); }
.tariff .btn { margin-top: auto; }
.tariff.popular { background: linear-gradient(color-mix(in srgb, var(--violet) 9%, var(--solid)), color-mix(in srgb, var(--violet) 9%, var(--solid))) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.tariff .sticker { right: 18px; top: 18px; --rot: 8deg; font-size: 12px; }
.tariff .t-price { font-family: var(--font-d); font-size: 32px; font-weight: 800; }
.tariff .t-price small { font-family: var(--font); font-size: 14px; color: var(--muted); font-weight: 600; }

.footer { margin-top: 100px; padding: 40px 0 60px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.link-btn { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }

/* ============ Страница курса ============ */
.page { padding-top: 24px; }
.back { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-weight: 600; margin-bottom: 16px; transition: gap .3s var(--ease), color .2s; }
.back:hover { gap: 12px; color: var(--text); }
.course-hero { background: var(--g); border: 0; color: #fff; min-height: 340px; display: flex; flex-direction: column; gap: 16px; }
.course-hero h1 { font-size: clamp(28px, 4vw, 48px); max-width: 640px; }
.course-hero p { max-width: 560px; opacity: .9; font-size: 16px; }
.course-hero .cc-sticker { position: absolute; right: 30px; bottom: 20px; font-size: 140px; height: auto; opacity: .95; animation: float 6s ease-in-out infinite; }
.teacher-row { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.teacher-row .ava { width: 48px; height: 48px; border-radius: 16px; background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 26px; backdrop-filter: blur(6px); }
.teacher-row small { display: block; opacity: .8; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats span { padding: 7px 13px; border-radius: 999px; background: rgba(0, 0, 0, .22); font-weight: 700; font-size: 13px; backdrop-filter: blur(6px); }
.buy-box { display: flex; flex-direction: column; gap: 12px; }
.t-option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--border); cursor: pointer; transition: all .25s var(--ease); background: var(--surface); }
.t-option:hover { border-color: var(--border-2); }
.t-option input { position: absolute; opacity: 0; pointer-events: none; }
.t-option .t-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); flex: none; transition: all .25s var(--spring); }
.t-option:has(input:checked) { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 10%, transparent); }
.t-option:has(input:checked) .t-radio { border: 6px solid var(--violet); }
.t-option .t-name { font-weight: 700; flex: 1; }
.t-option .t-name small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.t-option b { font-family: var(--font-d); font-size: 15px; white-space: nowrap; }
.program-list { list-style: none; display: grid; gap: 8px; counter-reset: l; }
.program-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); transition: all .3s var(--ease); }
a.program-item:hover { transform: translateX(6px); border-color: var(--border-2); background: var(--surface-2); }
.program-item .num { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-d); font-size: 14px; background: var(--surface-2); flex: none; }
.program-item.done .num { background: var(--ok-bg); color: var(--ok); }
.program-item .p-title { flex: 1; font-weight: 600; }
.program-item .p-title small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.lock { color: var(--faint); }

/* Прогресс */
.bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.bar i { position: absolute; inset: 0; border-radius: inherit; background: var(--g, var(--grad)); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); }
.bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent); animation: shimmer 2.2s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.bar.thin { height: 6px; }
.ring { --size: 120px; width: var(--size); height: var(--size); position: relative; flex: none; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .bg { stroke: var(--surface-3); }
.ring .fg { stroke-dasharray: 314; stroke-dashoffset: 314; transition: stroke-dashoffset 1.6s var(--ease); }
.ring .ring-val { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-d); font-weight: 800; font-size: 26px; }

/* ============ Модалка ============ */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(5, 4, 15, .6); backdrop-filter: blur(10px); animation: fadeIn .3s var(--ease); }
.modal-backdrop.closing { animation: fadeOut .25s var(--ease) forwards; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 32px; padding: 32px; background: var(--solid); border: 1px solid var(--border); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .6); animation: popIn .5s var(--spring); }
.modal.wide { width: min(980px, 100%); padding: 16px; }
.closing .modal { animation: popOut .25s var(--ease) forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(30px) scale(.94); } }
@keyframes popOut { to { opacity: 0; transform: translateY(20px) scale(.96); } }
.modal-x { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); font-size: 22px; line-height: 1; z-index: 2; transition: transform .3s var(--spring); }
.modal-x:hover { transform: rotate(90deg); }
.modal h2 { font-size: 26px; margin-bottom: 6px; }
.modal-sec { margin-top: 20px; display: grid; gap: 10px; }
.label { font-weight: 700; font-size: 14px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid var(--border); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(255, 61, 129, .16); background: var(--surface); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239c9ab6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m3 5 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.select option { background: var(--solid); color: var(--text); }
.row { display: flex; gap: 10px; align-items: center; }
.summary { border-radius: 20px; padding: 16px 18px; background: var(--surface-2); display: grid; gap: 8px; font-size: 15px; }
.summary div { display: flex; justify-content: space-between; }
.summary .total { font-family: var(--font-d); font-size: 22px; padding-top: 8px; border-top: 1px dashed var(--border-2); }
.secure-note { font-size: 12px; color: var(--muted); text-align: center; }
.processing, .success { text-align: center; padding: 30px 10px; display: grid; gap: 14px; justify-items: center; }
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 6px solid var(--surface-3); border-top-color: var(--pink); border-right-color: var(--violet); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success .big { font-size: 90px; animation: boing .9s var(--spring); }
@keyframes boing { 0% { transform: scale(0) rotate(-40deg); } 60% { transform: scale(1.2) rotate(10deg); } 100% { transform: scale(1); } }
.lightbox img { border-radius: 20px; max-height: 80dvh; margin: 0 auto; }

/* ============ Дашборд ============ */
.dash-greet { min-height: 230px; display: flex; flex-direction: column; gap: 14px; background: radial-gradient(120% 140% at 0% 0%, rgba(255, 61, 129, .22), rgba(255, 138, 61, .1) 55%, transparent 80%), var(--surface); }
.dash-greet h1 { font-size: clamp(28px, 3.4vw, 42px); }
.dash-greet .wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
.lvl { display: flex; align-items: center; gap: 14px; margin-top: auto; max-width: 520px; }
.lvl .lvl-badge { font-family: var(--font-d); font-weight: 800; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--lime); color: var(--on-lime); transform: rotate(-6deg); flex: none; }
.lvl .bar { flex: 1; }
.lvl small { color: var(--muted); font-weight: 600; }
.streak { background: linear-gradient(160deg, #fb923c, #ec4899); border: 0; color: #fff; display: flex; flex-direction: column; }
.streak .fire { font-size: 56px; line-height: 1; animation: flicker 1.4s ease-in-out infinite alternate; transform-origin: bottom; display: inline-block; }
@keyframes flicker { to { transform: scale(1.08) rotate(3deg); } }
.streak .num { font-family: var(--font-d); font-size: 52px; font-weight: 800; line-height: 1; }
.week-dots { display: flex; gap: 6px; margin-top: auto; }
.week-dots span { flex: 1; text-align: center; font-size: 11px; font-weight: 700; opacity: .8; }
.week-dots span::before { content: ''; display: block; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, .22); margin-bottom: 4px; }
.week-dots span.on::before { background: #fff; box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .3); }
.my-course { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); transition: all .35s var(--ease); }
.my-course + .my-course { margin-top: 10px; }
.my-course:hover { border-color: var(--border-2); transform: translateX(4px); }
.my-course .mc-ico { width: 56px; height: 56px; border-radius: 18px; background: var(--g); display: grid; place-items: center; font-size: 28px; }
.my-course h4 { font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: 0; margin-bottom: 6px; }
.mc-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.dl-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.dl-item:last-child { border: 0; }
.dl-date { width: 50px; height: 54px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; text-align: center; line-height: 1; flex: none; }
.dl-date b { font-family: var(--font-d); font-size: 18px; display: block; }
.dl-date small { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.dl-date.hot { background: var(--bad-bg); color: var(--bad); }
.dl-date.hot small { color: inherit; }
.dl-body { flex: 1; min-width: 0; }
.dl-body b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-body small { color: var(--muted); font-size: 12px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.wd { border-radius: 16px; padding: 10px 0; text-align: center; background: var(--surface); border: 1px solid var(--border); font-size: 12px; color: var(--muted); font-weight: 700; position: relative; }
.wd b { display: block; font-family: var(--font-d); font-size: 18px; color: var(--text); }
.wd.today { background: var(--text); color: var(--bg); border-color: transparent; }
.wd.today b { color: var(--bg); }
.wd.has::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--pink); }
.event { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.event + .event { margin-top: 8px; }
.event .ev-time { font-family: var(--font-d); font-weight: 700; font-size: 14px; min-width: 56px; }
.event .ev-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--g); flex: none; }
.event small { display: block; color: var(--muted); font-size: 12px; }
.ach-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.ach { text-align: center; padding: 16px 8px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); transition: transform .5s var(--spring); }
.ach:hover { transform: rotate(-4deg) scale(1.05); }
.ach .a-ico { font-size: 40px; display: block; margin-bottom: 6px; }
.ach b { font-size: 13px; display: block; }
.ach small { font-size: 11px; color: var(--muted); }
.ach.locked { opacity: .45; filter: grayscale(1); }
.hw-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); transition: all .3s var(--ease); }
.hw-row + .hw-row { margin-top: 8px; }
.hw-row:hover { border-color: var(--border-2); }
.hw-row .hw-ico { font-size: 22px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); flex: none; }
.hw-row .dl-body b { font-size: 14px; }
.buy-more { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; background: linear-gradient(135deg, rgba(195, 245, 60, .18), rgba(34, 211, 238, .14)), var(--surface); }

/* ============ Урок ============ */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--text); }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.lesson-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.lesson-head h1 { font-size: clamp(24px, 3vw, 36px); margin-top: 10px; }
.lesson-head .status-row { display: flex; gap: 8px; flex-wrap: wrap; }
.preview-banner { padding: 12px 18px; border-radius: 18px; background: var(--warn-bg); color: var(--warn); font-weight: 700; margin-bottom: 14px; }

.player { border-radius: 28px; overflow: hidden; background: #07070d; border: 1px solid var(--border); box-shadow: var(--shadow); outline: none; position: relative; user-select: none; }
.player:focus-visible { box-shadow: 0 0 0 3px var(--violet); }
.screen { aspect-ratio: 16/9; position: relative; overflow: hidden; cursor: pointer; background: #07070d; }
.screen video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.sim { position: absolute; inset: 0; color: #fff; }
.sim-bg { position: absolute; inset: -30%; background: var(--g); filter: saturate(1.2); opacity: .75; animation: simbg 16s linear infinite; animation-play-state: paused; }
.sim-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 40%, transparent 0, rgba(7, 7, 13, .7) 70%); }
@keyframes simbg { to { transform: rotate(360deg); } }
.playing .sim-bg, .playing .sym, .playing .eq b { animation-play-state: running; }
.sym { position: absolute; font-family: var(--font-d); font-weight: 800; font-size: clamp(22px, 4vw, 54px); opacity: .22; left: calc(8% + var(--i) * 15%); animation: symf 7s ease-in-out infinite; animation-delay: calc(var(--i) * -1.1s); animation-play-state: paused; }
@keyframes symf { 50% { transform: translateY(-24px) rotate(12deg); opacity: .4; } }
.sim-board { position: absolute; left: 6%; right: 30%; top: 50%; transform: translateY(-50%); }
.sim-board h2 { font-size: clamp(20px, 3.4vw, 42px); text-shadow: 0 6px 30px rgba(0, 0, 0, .4); }
.sim-board p { opacity: .75; margin-top: 10px; font-weight: 600; }
.sim-chapter { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); font-weight: 700; font-size: 13px; margin-bottom: 14px; }
.sim-chapter.pop { animation: chpop .6s var(--spring); }
@keyframes chpop { from { transform: translateY(10px) scale(.9); opacity: 0; } }
.sim-teacher { position: absolute; right: 5%; bottom: 8%; width: clamp(80px, 16vw, 160px); aspect-ratio: 1; border-radius: 30%; background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); display: grid; place-items: center; font-size: clamp(40px, 8vw, 84px); border: 2px solid rgba(255, 255, 255, .25); }
.eq { position: absolute; bottom: 10%; display: flex; gap: 3px; height: 18px; align-items: flex-end; }
.eq b { width: 4px; background: #fff; border-radius: 4px; height: 30%; animation: eq .8s ease-in-out infinite alternate; animation-play-state: paused; }
.eq b:nth-child(2) { animation-delay: -.2s; } .eq b:nth-child(3) { animation-delay: -.5s; } .eq b:nth-child(4) { animation-delay: -.35s; }
@keyframes eq { to { height: 100%; } }
.big-play { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #111; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .5); transition: transform .4s var(--spring), opacity .3s; z-index: 3; }
.big-play svg { width: 34px; height: 34px; margin-left: 4px; }
.big-play:hover { transform: scale(1.1); }
.big-play::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); animation: ripple 2s infinite; }
@keyframes ripple { to { transform: scale(1.4); opacity: 0; } }
.playing .big-play { opacity: 0; transform: scale(.6); pointer-events: none; }
.player-toast { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 4; backdrop-filter: blur(8px); }
.player-toast.show { opacity: 1; }
.player-err { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; padding: 20px; text-align: center; background: rgba(0, 0, 0, .7); }
.controls { padding: 10px 16px 14px; background: linear-gradient(#0b0b14, #07070d); color: #fff; }
.timeline { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.tl-track { position: absolute; left: 0; right: 0; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .16); overflow: hidden; transition: height .2s; }
.timeline:hover .tl-track { height: 9px; }
.tl-fill { height: 100%; width: 0; background: var(--grad); border-radius: inherit; }
.tl-mark { position: absolute; width: 3px; height: 11px; background: #07070d; transform: translateX(-50%); z-index: 1; pointer-events: none; }
.tl-thumb { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; transform: translateX(-50%) scale(0); transition: transform .25s var(--spring); z-index: 2; box-shadow: 0 0 0 5px rgba(236, 72, 153, .35); pointer-events: none; }
.timeline:hover .tl-thumb { transform: translateX(-50%) scale(1); }
.tl-tip { position: absolute; bottom: 26px; transform: translateX(-50%); padding: 6px 10px; border-radius: 10px; background: #fff; color: #111; font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.tl-tip b { font-family: var(--font-d); margin-right: 4px; }
.timeline:hover .tl-tip { opacity: 1; }
.ctrl-row { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.pbtn { height: 38px; min-width: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; transition: background .2s, transform .3s var(--spring); font-weight: 800; font-size: 13px; padding: 0 8px; }
.pbtn:hover { background: rgba(255, 255, 255, .12); transform: scale(1.08); }
.pbtn svg { width: 20px; height: 20px; }
.ptime { font-size: 13px; color: rgba(255, 255, 255, .7); margin-left: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ptime b { color: #fff; }
.pchapter { font-size: 13px; color: rgba(255, 255, 255, .6); margin-left: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.pchapter::before { content: '•'; margin-right: 10px; }
.player:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.player:fullscreen .screen { flex: 1; aspect-ratio: auto; }

.tabs { display: flex; gap: 4px; margin: 20px 0 14px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button { padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; transition: all .3s var(--ease); display: flex; gap: 6px; align-items: center; }
.tabs button.active { background: var(--text); color: var(--bg); }
.tabs .tab-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); font-size: 11px; display: grid; place-items: center; }
.panel { display: none; }
.panel.active { display: block; animation: viewIn .45s var(--ease); }
.notes { display: grid; gap: 14px; }
.notes ol { padding-left: 0; list-style: none; counter-reset: n; display: grid; gap: 10px; }
.notes li { counter-increment: n; display: flex; gap: 12px; align-items: flex-start; }
.notes li::before { content: counter(n); flex: none; width: 28px; height: 28px; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-family: var(--font-d); font-size: 12px; }
.rule-card { padding: 18px 20px; border-radius: 22px; background: var(--lime); color: var(--on-lime); transform: rotate(-.6deg); }
.rule-card small { font-weight: 700; font-size: 13px; opacity: .75; }
.rule-card p { font-family: var(--font-d); font-size: 18px; font-weight: 700; margin-top: 4px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); transition: border-color .2s; }
.file-row + .file-row { margin-top: 8px; }
.file-row:hover { border-color: var(--border-2); }
.f-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 11px; color: #fff; flex: none; background: var(--grad-2); overflow: hidden; }
.f-ico.pdf { background: linear-gradient(135deg, #f43f5e, #fb923c); }
.f-ico.img { background: linear-gradient(135deg, #22c55e, #22d3ee); }
.f-ico img { width: 100%; height: 100%; object-fit: cover; }
.f-body { flex: 1; min-width: 0; }
.f-body b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-body small { color: var(--muted); font-size: 12px; }
.f-up { height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.f-up i { display: block; height: 100%; background: var(--grad); animation: up 1s var(--ease) forwards; }
@keyframes up { from { width: 0; } to { width: 100%; } }
.x-btn { width: 32px; height: 32px; border-radius: 10px; color: var(--muted); font-size: 18px; transition: all .2s; flex: none; }
.x-btn:hover { background: var(--bad-bg); color: var(--bad); }

.hw-section { margin-top: 26px; }
.hw-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.hw-head h2 { font-size: 24px; margin-top: 8px; }
.hw-task { padding: 18px 20px; border-radius: 22px; background: var(--surface-2); margin-bottom: 18px; display: grid; gap: 12px; }
.task-list { padding-left: 22px; display: grid; gap: 6px; }
.dropzone {
  position: relative; border-radius: 26px; padding: 34px 20px; text-align: center; cursor: pointer; display: grid; gap: 6px; justify-items: center;
  border: 2px dashed var(--border-2); background: var(--surface); transition: all .3s var(--ease); outline: none;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 7%, transparent); }
.dropzone.drag { border-color: var(--pink); border-style: solid; background: color-mix(in srgb, var(--pink) 10%, transparent); transform: scale(1.015); }
.dz-icon { width: 70px; height: 70px; border-radius: 22px; display: grid; place-items: center; font-size: 32px; background: var(--grad); margin-bottom: 8px; box-shadow: 0 14px 30px -10px rgba(236, 72, 153, .6); transition: transform .5s var(--spring); }
.dropzone:hover .dz-icon { transform: translateY(-6px) rotate(-8deg); }
.dropzone.drag .dz-icon { transform: scale(1.2) rotate(8deg); }
.dropzone span { color: var(--muted); font-size: 14px; }
.dropzone u { color: var(--text); }
.upload-list { margin: 14px 0; }
.hw-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

.status-card { border-radius: 24px; padding: 20px; margin-bottom: 18px; display: grid; gap: 14px; border: 1px solid var(--border); }
.status-card.s-pending { background: var(--warn-bg); }
.status-card.s-revision { background: var(--bad-bg); }
.status-card.s-accepted { background: var(--ok-bg); }
.sc-head { display: flex; gap: 14px; align-items: center; }
.sc-head .sc-ico { font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: var(--solid); flex: none; }
.sc-head h3 { font-size: 18px; margin: 0 0 2px; }
.thread { display: grid; gap: 10px; }
.bubble { max-width: 88%; padding: 12px 16px; border-radius: 20px; background: var(--solid); border: 1px solid var(--border); font-size: 14px; }
.bubble.me { justify-self: end; border-bottom-right-radius: 6px; }
.bubble.them { border-bottom-left-radius: 6px; }
.bubble .b-meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bubble .b-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bubble .b-files a, .bubble .b-files span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); }
.score-pill { font-family: var(--font-d); font-weight: 800; padding: 6px 12px; border-radius: 12px; background: var(--lime); color: var(--on-lime); font-size: 14px; }

/* Квиз */
.quiz { display: grid; gap: 14px; }
.q-card { padding: 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); transition: border-color .3s, background .3s; animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.q-card.shake { animation: shake .5s; border-color: var(--bad); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.q-top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.q-num { font-family: var(--font-d); font-size: 13px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-3); flex: none; }
.q-type { font-size: 12px; color: var(--muted); font-weight: 700; }
.q-text { font-weight: 700; font-size: 17px; margin-bottom: 14px; }
.opts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.opt { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: all .25s var(--ease); font-weight: 600; }
.opt:hover { border-color: var(--border-2); transform: translateY(-2px); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-l { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); font-family: var(--font-d); font-size: 12px; flex: none; transition: all .3s var(--spring); }
.opt.multi .opt-l { border-radius: 8px; }
.opt:has(input:checked) { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); }
.opt:has(input:checked) .opt-l { background: var(--violet); color: #fff; transform: scale(1.1) rotate(-6deg); }
.short-ans { display: flex; align-items: center; gap: 10px; max-width: 100%; }
.short-ans label { font-weight: 800; font-size: 13px; color: var(--muted); }
/* Бланк ответа: ровно один символ в клетке (клетка 32px, символ моноширинный 1ch), 17 клеток как в бланке ЕГЭ */
.short-ans .input {
  --cell: 32px;
  font-family: 'Courier New', monospace; font-weight: 700; font-size: 18px; text-transform: uppercase;
  letter-spacing: calc(var(--cell) - 1ch);
  padding: 0 0 0 calc((var(--cell) - 1ch) / 2);
  width: calc(var(--cell) * 17 + 2px); max-width: 100%; flex: 0 1 auto;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--cell) - 1px), var(--border) calc(var(--cell) - 1px) var(--cell));
  background-origin: padding-box; background-clip: padding-box;
}
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.q-card.right { border-color: color-mix(in srgb, var(--green) 50%, transparent); }
.q-card.wrong { border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.q-mark { margin-left: auto; font-weight: 800; font-size: 13px; padding: 5px 11px; border-radius: 99px; }
.right .q-mark { background: var(--ok-bg); color: var(--ok); }
.wrong .q-mark { background: var(--bad-bg); color: var(--bad); }
.opt.is-correct { border-color: var(--green); background: var(--ok-bg); }
.opt.is-correct .opt-l { background: var(--green); color: #fff; }
.opt.is-wrong { border-color: var(--red); background: var(--bad-bg); }
.opt.is-wrong .opt-l { background: var(--red); color: #fff; }
.opt.ro { cursor: default; }
.opt.ro:hover { transform: none; }
.opt .tag { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 700; }
.explain { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-size: 14px; }
.explain b { color: var(--violet); }
.ans-line { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.ans-line code { font-family: 'Courier New', monospace; font-weight: 800; padding: 3px 10px; border-radius: 8px; background: var(--surface-3); }
.ans-line code.ok { background: var(--ok-bg); color: var(--ok); }
.ans-line code.bad { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; }
.result-head { display: flex; gap: 24px; align-items: center; padding: 22px; border-radius: 26px; background: radial-gradient(120% 160% at 0% 0%, rgba(255, 61, 129, .2), rgba(255, 138, 61, .1) 60%, transparent 85%), var(--surface); border: 1px solid var(--border); flex-wrap: wrap; }
.result-head h3 { font-size: 24px; margin-bottom: 4px; }
.result-head .ring { --size: 110px; }

.lesson-aside { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }
.lesson-aside .tile { padding: 20px; }
.tc-item { display: flex; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; transition: all .25s var(--ease); align-items: center; font-weight: 600; font-size: 14px; }
.tc-item:hover { background: var(--surface-2); }
.tc-item.active { background: color-mix(in srgb, var(--pink) 14%, transparent); }
.tc-item code { font-family: var(--font-d); font-size: 12px; padding: 4px 8px; border-radius: 8px; background: var(--surface-3); flex: none; }
.tc-item.active code { background: var(--pink); color: #fff; }
.ls-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; font-size: 14px; font-weight: 600; transition: background .2s; }
.ls-item:hover { background: var(--surface-2); }
.ls-item.current { background: var(--surface-3); }
.ls-dot { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; background: var(--surface-3); flex: none; font-family: var(--font-d); }
.ls-dot.done { background: var(--ok-bg); color: var(--ok); }
.ls-dot.half { background: var(--warn-bg); color: var(--warn); }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }

/* ============ Преподаватель ============ */
.t-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { padding: 18px 20px; }
.stat b { font-family: var(--font-d); font-size: 34px; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .s-ico { position: absolute; right: 16px; top: 14px; font-size: 26px; opacity: .9; }
.review-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.sub-list { display: grid; gap: 8px; max-height: 70dvh; overflow: auto; padding: 2px; }
.sub-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--border); text-align: left; transition: all .25s var(--ease); width: 100%; }
.sub-item:hover { border-color: var(--border-2); }
.sub-item.active { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 10%, transparent); }
.s-ava { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad-2); flex: none; }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumb { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4/5; background: var(--surface-2); position: relative; transition: transform .3s var(--spring); }
.thumb:hover { transform: scale(1.03); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span { position: absolute; left: 8px; right: 8px; bottom: 8px; font-size: 11px; padding: 4px 8px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-thumb { display: grid; place-items: center; text-align: center; padding: 14px; gap: 6px; font-size: 13px; font-weight: 600; }
.doc-thumb .f-ico { width: 56px; height: 56px; font-size: 13px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { font-size: 12px; padding: 6px 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; transition: all .2s; }
.quick button:hover { border-color: var(--violet); }
.scores { display: flex; gap: 6px; }
.scores button { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--border); font-family: var(--font-d); font-weight: 700; transition: all .25s var(--spring); }
.scores button.active { background: var(--lime); color: var(--on-lime); border-color: transparent; transform: scale(1.1) rotate(-5deg); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1/-1; }
.field label { font-weight: 700; font-size: 13px; color: var(--muted); }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-card { padding: 18px; border-radius: 22px; border: 2px solid var(--border); background: var(--surface); text-align: left; transition: all .3s var(--ease); display: grid; gap: 4px; }
.type-card .big { font-size: 30px; }
.type-card small { color: var(--muted); }
.type-card.active { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 10%, transparent); transform: translateY(-2px); }
.qb { padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 10px; animation: cardIn .4s var(--ease); }
.qb-top { display: flex; gap: 10px; align-items: center; }
.qb-top .select { width: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
.qb-opt { display: flex; gap: 8px; align-items: center; }
.qb-opt .input { min-height: 42px; padding: 8px 14px; }
.correct-toggle { width: 42px; height: 42px; border-radius: 13px; border: 1.5px solid var(--border-2); flex: none; display: grid; place-items: center; font-weight: 800; transition: all .25s var(--spring); color: transparent; }
.correct-toggle.on { background: var(--green); border-color: var(--green); color: #fff; transform: scale(1.05); }
.mini-drop { border: 2px dashed var(--border-2); border-radius: 18px; padding: 16px; text-align: center; color: var(--muted); cursor: pointer; transition: all .2s; }
.mini-drop:hover, .mini-drop.drag { border-color: var(--violet); color: var(--text); }

/* ============ Тосты / конфетти ============ */
#toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 12px 14px 12px 18px; border-radius: 18px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .5); animation: toastIn .5s var(--spring); }
.toast.warn { background: var(--amber); color: #1b1200; }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast a { font-weight: 800; text-decoration: underline; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; width: 100%; height: 100%; }

/* ============ Адаптив ============ */
@media (max-width: 1060px) {
  .lesson-grid { grid-template-columns: minmax(0, 1fr); }
  .lesson-aside { position: static; grid-template-columns: 1fr 1fr; }
  .review-grid { grid-template-columns: minmax(0, 1fr); }
  .sub-list { max-height: none; }
  .span-3 { grid-column: span 6; }
  .span-4, .span-5 { grid-column: span 6; }
  .span-7, .span-8 { grid-column: span 12; }
  .hero-art { min-height: 320px; }
  .t-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  :root { --header-h: 62px; }
  body { padding-bottom: 84px; }
  /* backdrop-filter у шапки сделал бы её containing block для fixed-навигации */
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: color-mix(in srgb, var(--bg) 94%, transparent); }
  .nav { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px; margin: 0; justify-content: space-around; padding: 6px; border-radius: 24px; background: color-mix(in srgb, var(--solid) 88%, transparent); backdrop-filter: blur(16px); box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .5); }
  .nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 8px 10px; border-radius: 18px; flex: 1; }
  .nav-ico { display: block; font-size: 20px; }
  .bento { gap: 12px; }
  .bento > * { grid-column: span 12 !important; }
  .tile { padding: 20px; border-radius: 26px; }
  .hero-main { padding: 26px; min-height: 0; }
  .hero-main .sticker { display: none; }
  .hero-art { min-height: 260px; }
  .feat-video { grid-template-columns: 1fr; }
  .tariffs { grid-template-columns: 1fr; }
  .search { margin-left: 0; width: 100%; min-width: 0; }
  .lesson-aside { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .pchapter, .ptime { display: none; }
  .sim-teacher { display: none; }
  .sim-board { right: 6%; top: auto; bottom: 8%; transform: none; }
  .sim-board h2 { font-size: 18px; }
  .sim-board p, .sim-chapter { display: none; }
  .big-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .big-play svg { width: 24px; height: 24px; }
  .modal { padding: 24px 20px; border-radius: 28px; }
  .my-course { grid-template-columns: 48px 1fr; }
  .my-course .btn { grid-column: 1/-1; }
  .my-course .mc-ico { width: 48px; height: 48px; }
  .course-hero .cc-sticker { font-size: 90px; opacity: .4; }
  .section { padding-top: 72px; }
  .lesson-nav .btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ============ Доработки по аудиту redesign-existing-projects ============ */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.price b, .t-price, .ptime, .stat b, .dl-date b, .num, .ring-val, .summary, .hero-art-cap b { font-variant-numeric: tabular-nums; }
/* лёгкое зерно, чтобы градиенты не выглядели стерильно */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 400; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.skip { position: fixed; left: 16px; top: -60px; z-index: 500; padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 700; transition: top .2s var(--ease); }
.skip:focus { top: 12px; }
.legal { display: flex; gap: 16px; flex-wrap: wrap; }
.not-found { text-align: center; padding: 80px 20px; display: grid; gap: 16px; justify-items: center; }
.not-found .score-big { position: static; font-size: clamp(110px, 20vw, 200px); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; animation: none; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* ============ Векторные иконки ============ */
.ic { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.14em; }
.btn .ic { width: 1.1em; height: 1.1em; }
h3 .ic, .pill .ic, .status .ic, .chip .ic { color: var(--violet); }
.chip.active .ic { color: inherit; }
.nav-ico .ic { width: 22px; height: 22px; }
.theme-btn .ic { width: 20px; height: 20px; }
.exam-tile .ex-emoji { color: #fff; font-size: 34px; }
.exam-tile .ex-emoji .ic { stroke-width: 1.8; }
.exam-tile .arrow .ic { width: 18px; height: 18px; }
.cc-sticker { color: #fff; font-size: 54px; }
.cc-sticker .ic { stroke-width: 1.6; }
.course-hero .cc-sticker .ic { stroke-width: 1.2; }
.badge .ic { width: 12px; height: 12px; vertical-align: -1px; }
.t-emoji { color: var(--violet); font-size: 30px; }
.tariff.popular .t-emoji { color: var(--pink); }
.mc-ico { color: #fff; }
.mc-ico .ic { width: 26px; height: 26px; }
.teacher-row .ava, .sim-teacher span { font-family: var(--font-d); font-weight: 800; color: #fff; }
.teacher-row .ava { font-size: 16px; }
.sim-teacher span { font-size: clamp(28px, 5vw, 56px); }
.streak .fire .ic { width: 48px; height: 48px; color: #fff; }
.ach .a-ico { color: var(--violet); font-size: 34px; }
.sc-ico { color: var(--violet); }
.sc-ico .ic { width: 28px; height: 28px; }
.s-ico { color: var(--violet); }
.s-ico .ic { width: 24px; height: 24px; }
.hw-row .hw-ico { color: var(--violet); }
.hw-row .hw-ico .ic { width: 20px; height: 20px; }
.dz-icon { color: #fff; }
.dz-icon .ic { width: 30px; height: 30px; }
.empty .big { color: var(--faint); }
.empty .big .ic { width: 48px; height: 48px; stroke-width: 1.6; }
.success .big.success-ic { color: var(--violet); }
.success .big .ic { width: 80px; height: 80px; stroke-width: 1.5; }
.buy-more-ic { color: var(--violet); }
.buy-more-ic .ic { width: 40px; height: 40px; }
.type-card .big { color: var(--violet); }
.type-card .big .ic { width: 28px; height: 28px; }
.opt-l .ic, .ls-dot .ic, .num .ic { width: 15px; height: 15px; }
.f-ico .ic { width: 20px; height: 20px; }
.correct-toggle .ic { width: 18px; height: 18px; }
.x-btn { display: grid; place-items: center; }
.x-btn .ic { width: 16px; height: 16px; }
.modal-x { display: grid; place-items: center; }
.modal-x .ic { width: 18px; height: 18px; }
.lock .ic { width: 18px; height: 18px; }
.hero-stats .ic { width: 15px; height: 15px; vertical-align: -2px; margin-right: 2px; }
.thumb span .ic { width: 12px; height: 12px; }
.preview-banner .ic { width: 18px; height: 18px; vertical-align: -3px; }

/* ============ Разгруженная главная ============ */
.hero-main { min-height: 480px; gap: 26px; }
.hero-art { min-height: 480px; }
.hero-note { font-size: 14px; color: var(--muted); }
.hero-note b { color: var(--text); font-family: var(--font-d); }
.lead { max-width: 520px; }
.section-head { margin-bottom: 32px; }
@media (max-width: 1060px) {
  .hero-main, .hero-art { grid-column: span 12; }
  .hero-main, .hero-art { min-height: 0; }
  .hero-art { min-height: 300px; }
}
@media (min-width: 761px) and (max-width: 1060px) {
  .exam-tile.span-4 { grid-column: span 4; }
}

/* =====================================================================
   v3: вход, роли, админка, анимации
   ===================================================================== */
:root { --chart: #e8336f; }
[data-theme="dark"] { --chart: #f2477f; }

/* --- индикатор прокрутки и шапка --- */
.scroll-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.scroll-progress i { display: block; height: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; }
.topbar { transition: box-shadow .3s var(--ease), background-color .3s; }
.topbar.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35); }
.user-slot { position: relative; display: flex; align-items: center; }
button.avatar { border: 0; cursor: pointer; font-family: var(--font-d); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; width: 270px; padding: 14px; border-radius: 20px;
  background: var(--solid); border: 1px solid var(--border); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45);
  display: grid; gap: 4px; transform-origin: top right; animation: menuIn .28s var(--spring);
}
.user-menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.user-menu > b { font-family: var(--font-d); font-size: 15px; }
.um-xp { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--violet); margin: 6px 0; }
.um-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; font-weight: 600; font-size: 14px; text-align: left; width: 100%; transition: background .2s; }
.um-link:hover { background: var(--surface-2); }
.um-link .ic { color: var(--muted); width: 18px; height: 18px; }

/* --- вход / регистрация --- */
.auth { display: grid; gap: 16px; margin-top: 18px; }
.auth-seg { width: 100%; }
.auth-seg button { flex: 1; }
.auth-form { display: grid; gap: 12px; }
.auth-form .field span, .course-form .field span, .user-form .field span, .promo-form .field span { font-weight: 700; font-size: 13px; color: var(--muted); }
.auth-error { color: var(--bad); font-weight: 600; font-size: 14px; }
.auth-form.shake { animation: shake .45s; }
.demo-logins { display: grid; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--border-2); }
.demo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-row .btn { flex: 1; }
.gate { max-width: 520px; margin: 40px auto; display: grid; gap: 12px; text-align: center; justify-items: center; }
.gate .auth { text-align: left; width: 100%; }
.gate-ic { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 16px 34px -12px rgba(255, 61, 129, .6); animation: float 5s ease-in-out infinite; }
.gate-ic .ic { width: 32px; height: 32px; }
.course-form, .user-form { display: grid; gap: 12px; margin-top: 16px; }

/* --- кнопки: занятость, волна, магнит, опасные --- */
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::before { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--text); border-left-color: transparent; border-right-color: transparent; animation: spin .7s linear infinite; z-index: 2; }
.btn-primary.is-busy::before, .btn-danger.is-busy::before, .btn-ok.is-busy::before { border-top-color: #fff; border-bottom-color: #fff; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .22; transform: scale(0); pointer-events: none; animation: ripple-in .65s var(--ease) forwards; z-index: 0; }
@keyframes ripple-in { to { transform: scale(1); opacity: 0; } }
.magnetic { transform: translate(var(--mx-off, 0), var(--my-off, 0)); transition: transform .35s var(--spring), box-shadow .3s; }
.magnetic:active { transform: translate(var(--mx-off, 0), var(--my-off, 0)) scale(.97); }
.btn-danger { background: var(--bad); color: #fff; border: 0; }
.btn-danger:hover { box-shadow: 0 12px 28px -10px var(--bad); }
.ok-line { color: var(--ok); }

/* --- 3D-наклон карточек --- */
.tilt { transform-style: preserve-3d; }
.tilt.tilting { transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-6px); transition: transform .12s linear, box-shadow .4s, border-color .3s; }
.course-card.tilting .cc-sticker { transform: translateZ(40px) rotate(-8deg) scale(1.1); }
.exam-tile.tilting .ex-emoji { transform: translateZ(30px) rotate(-10deg) scale(1.08); }

/* --- заголовок по словам --- */
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.words .w > span { display: inline-block; animation: wordUp .9s var(--ease) both; animation-delay: calc(120ms + var(--wi) * 70ms); }
@keyframes wordUp { from { transform: translateY(105%) rotate(4deg); opacity: 0; } }

/* --- hero: живой градиент, второе свечение, счёт 100 --- */
.hero-art { background-size: 200% 200%; animation: gradShift 12s ease-in-out infinite alternate; }
@keyframes gradShift { to { background-position: 100% 100%; } }
.orb-2 { width: 220px !important; height: 220px !important; top: auto !important; right: auto !important; bottom: -70px; left: -60px; animation-delay: -3s !important; opacity: .7; }
.score-big { animation: rocket 6s ease-in-out infinite, scoreGlow 4s ease-in-out infinite alternate; }
@keyframes scoreGlow { to { text-shadow: 0 30px 60px rgba(120, 20, 40, .5), 0 0 40px rgba(255, 255, 255, .35); } }

/* --- популярный тариф: вращающаяся рамка --- */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.tariff.popular {
  background: linear-gradient(color-mix(in srgb, var(--violet) 9%, var(--solid)), color-mix(in srgb, var(--violet) 9%, var(--solid))) padding-box,
              conic-gradient(from var(--ang), #ff3d81, #ffae3a, #c3f53c, #22d3ee, #ff3d81) border-box;
  animation: spinBorder 6s linear infinite;
}
@keyframes spinBorder { to { --ang: 360deg; } }

/* --- прогресс в карточке курса --- */
.cc-progress { margin-top: 2px; }

/* --- тосты с иконкой и полоской времени --- */
.toast { position: relative; overflow: hidden; }
.toast > .ic { width: 18px; height: 18px; flex: none; }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--grad); transform-origin: left; animation: toastLife var(--life, 3400ms) linear forwards; }
@keyframes toastLife { to { transform: scaleX(0); } }

/* --- скелетоны --- */
.skeleton-wrap { display: grid; gap: 14px; padding: 8px 0; }
.skel { height: 74px; width: var(--w); border-radius: 22px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: skel 1.3s linear infinite; }
.skel:first-child { height: 120px; }
@keyframes skel { to { background-position: -200% 0; } }

/* --- переходы между экранами (View Transitions) --- */
.vt .view { animation: none; }
::view-transition-old(root) { animation: vtOut .28s var(--ease) both; }
::view-transition-new(root) { animation: vtIn .5s var(--ease) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-8px) scale(.995); filter: blur(4px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

/* --- кабинет: оживление --- */
.week-dots span.on::before { animation: dotPop .5s var(--spring) both; animation-delay: calc(var(--i) * 70ms + 300ms); }
@keyframes dotPop { from { transform: scale(.4); opacity: 0; } }
.ach { animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.ach:not(.locked) .a-ico { animation: achGlow 3s ease-in-out infinite alternate; }
@keyframes achGlow { to { filter: drop-shadow(0 0 10px rgba(255, 61, 129, .55)); } }
.sub-item { animation: cardIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }

/* --- админка --- */
.admin-tabs { margin-top: 0; }
.admin-panel { animation: viewIn .45s var(--ease); display: grid; gap: 16px; }
.admin-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.admin-bar .search { margin-left: 0; flex: 1; max-width: 420px; }
.table-tile { padding: 0; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td small { display: block; font-size: 12px; }
.table .num-col { text-align: right; white-space: nowrap; }
.table tr.is-blocked td { opacity: .5; }
.table tr.is-blocked td:last-child { opacity: 1; }
.u-cell { display: flex; gap: 12px; align-items: center; min-width: 220px; }
.u-cell .s-ava { width: 38px; height: 38px; border-radius: 12px; font-size: 15px; }
.u-cell .s-ava .ic { width: 18px; height: 18px; }
.mini-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); font-size: 11px; font-weight: 800; letter-spacing: .02em; vertical-align: 1px; }
.mini-tag.big-tag { font-size: 13px; margin: 0; padding: 4px 10px; font-family: var(--font-d); }
.select-sm, .input-sm { min-height: 38px; padding: 6px 12px; border-radius: 12px; font-size: 14px; width: auto; }
.select-sm { padding-right: 34px; background-position: right 10px center; }
.input-sm { width: 120px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); transition: background .25s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s var(--spring); }
.switch input:checked + span { background: var(--grad); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.promo-form { display: grid; gap: 12px; align-content: start; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.danger-zone h3 { margin-bottom: 4px; }

/* график выручки */
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.ch-base { stroke: var(--border-2); stroke-width: 1; }
.ch-axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.ch-val { fill: var(--text); font-size: 12px; font-weight: 700; font-family: var(--font); }
.ch-hit { fill: transparent; }
.ch-bar { fill: var(--chart); transform-box: fill-box; transform-origin: bottom; animation: barGrow .9s var(--ease) both; animation-delay: calc(var(--i) * 45ms); transition: opacity .2s; }
@keyframes barGrow { from { transform: scaleY(0); } }
.chart-wrap:hover .ch-bar { opacity: .45; }
.chart-wrap:hover .ch-col.hover .ch-bar { opacity: 1; }
.ch-col.hover .ch-hit { fill: var(--surface-2); }
.ch-tip { position: absolute; transform: translate(-50%, -100%); padding: 8px 12px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 13px; pointer-events: none; display: grid; white-space: nowrap; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); }
.ch-tip[hidden] { display: none; }
.ch-tip span { font-size: 12px; opacity: .8; }
.table-view { margin-top: 10px; font-size: 14px; }
.table-view summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.table-view .table { margin-top: 8px; }
.top-list { display: grid; gap: 14px; }
.top-row { display: grid; gap: 6px; animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.top-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.top-line b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-line span { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hbar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.hbar.thin { height: 4px; margin-top: 6px; max-width: 120px; }
.hbar i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--chart); transform-origin: left; animation: barGrowX 1s var(--ease) both; }
@keyframes barGrowX { from { transform: scaleX(0); } }

@media (max-width: 760px) {
  .user-menu { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 6px); width: auto; }
  .topbar-actions .btn-sm { padding: 0 12px; }
  .danger-zone .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tilt.tilting, .magnetic { transform: none !important; }
  .words .w > span { animation: none; }
}

/* атрибут hidden всегда сильнее display у компонентов */
[hidden] { display: none !important; }

.stat b { padding-right: 34px; }
.stat b .cur { font-size: .55em; color: var(--muted); }

/* журнал действий в админке */
.audit { display: grid; gap: 2px; }
.audit-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px dashed var(--border); font-size: 14px; animation: cardIn .4s var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
.audit-row:last-child { border-bottom: 0; }
.audit-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.audit-row code { font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); }

/* =====================================================================
   v4: Фичи конкурентов (100балльный репетитор, Школково)
   Пруфы, лид-форма с мессенджерами, кейсы «было-стало», FAQ, футер,
   тест-драйв первого урока, куки-баннер, документы 152-ФЗ и вычет 13%
   ===================================================================== */

/* --- Пруфы / ключевые метрики (Социальное доказательство) --- */
.proof-section { margin-top: 24px; }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.proof-card {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .3s;
}
.proof-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
}
.proof-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
  opacity: .7;
}
.proof-card:nth-child(2)::after { background: var(--grad-2); }
.proof-card:nth-child(3)::after { background: var(--grad-3); }
.proof-card:nth-child(4)::after { background: linear-gradient(135deg, var(--lime), var(--cyan)); }
.proof-num {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.05;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.proof-card:nth-child(2) .proof-num { background-image: var(--grad-2); }
.proof-card:nth-child(3) .proof-num { background-image: var(--grad-3); }
.proof-card:nth-child(4) .proof-num { background-image: linear-gradient(135deg, var(--lime), var(--cyan)); }
.proof-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 600;
}

/* --- Hero top badge & Тест-драйв бейджи --- */
.hero-top-badge { margin-bottom: -6px; }
.trial-badge {
  background: var(--lime);
  color: var(--on-lime);
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.trial-badge .ic { width: 14px; height: 14px; }
.trial-badge.mini-badge {
  font-size: 10px;
  padding: 2px 7px;
  margin-left: auto;
  border-radius: 6px;
  transform: none;
}
.pill-trial {
  background: color-mix(in srgb, var(--lime) 20%, transparent);
  border-color: color-mix(in srgb, var(--lime) 40%, transparent);
  color: color-mix(in srgb, var(--lime) 70%, var(--text));
  font-weight: 700;
}
.trial-btn {
  color: var(--lime);
  border-color: color-mix(in srgb, var(--lime) 40%, transparent);
}
.trial-btn:hover {
  background: color-mix(in srgb, var(--lime) 15%, transparent);
  color: var(--lime);
  border-color: var(--lime);
}
.cc-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}
.cc-actions.has-trial {
  grid-template-columns: 1.15fr 1fr;
}
.cc-actions .btn {
  width: 100%;
  padding: 0 8px;
  font-size: 13px;
  --bh: 36px;
  justify-content: center;
  white-space: nowrap;
}
.cc-actions .trial-btn {
  background: color-mix(in srgb, var(--lime) 12%, transparent);
  border-color: color-mix(in srgb, var(--lime) 50%, transparent);
  color: var(--lime);
  font-weight: 700;
}
.cc-actions .trial-btn:hover {
  background: color-mix(in srgb, var(--lime) 22%, transparent);
  border-color: var(--lime);
}

/* --- Лид-форма подбора курса (конкуренты) --- */
.lead-box {
  padding: 40px;
  border-radius: var(--r-xl);
  background: radial-gradient(120% 160% at 100% 0%, rgba(255, 61, 129, .15), rgba(255, 174, 58, .08) 45%, transparent 75%), var(--surface);
  border: 1px solid var(--border-2);
}
.lead-head {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
  max-width: 680px;
}
.lead-head h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.15;
}
.lead-head p {
  font-size: 16px;
}
.hp-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
  margin: 0; padding: 0;
}

/* --- Стилизованный выбор класса --- */
.grade-picker-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.grade-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.grade-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.grade-hint {
  font-size: 12px;
  color: var(--faint);
  font-weight: 500;
}
.grade-chips {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  isolation: isolate;
}
.grade-chips .grade-chip-indicator {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 18px;
  background: color-mix(in srgb, var(--violet) 12%, var(--surface));
  border: 2px solid var(--violet);
  box-shadow: 0 8px 30px -4px rgba(255, 61, 129, .38);
  pointer-events: none;
  z-index: 1;
  will-change: transform, width, height;
  transition: transform .32s cubic-bezier(.22, 1, .36, 1),
              width .32s cubic-bezier(.22, 1, .36, 1),
              height .32s cubic-bezier(.22, 1, .36, 1),
              opacity .2s ease;
}
.grade-chip {
  position: relative;
  z-index: 2;
}
.grade-chip.active {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}
.grade-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 12px 6px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: transform .25s var(--spring), border-color .2s, background .2s, box-shadow .3s;
  text-align: center;
  position: relative;
  overflow: hidden;
  user-select: none;
}
.grade-chip:hover {
  border-color: var(--border-2);
  background: var(--surface-3);
  transform: translateY(-2px);
}
.grade-chip.active {
  border-color: var(--violet);
  background: color-mix(in srgb, var(--violet) 14%, var(--surface));
  box-shadow: 0 8px 24px -6px rgba(255, 61, 129, .4);
  transform: translateY(-2px);
}
.grade-chip.active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
}
.gc-name {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
}
.gc-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: -.01em;
}
.grade-chip.active .gc-sub {
  color: color-mix(in srgb, var(--violet) 75%, var(--text));
}
.grade-chip:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.lead-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: stretch;
}
.lead-inputs .input {
  min-height: 52px;
  font-size: 15px;
}
.lead-inputs .btn {
  min-height: 52px;
  padding: 0 28px;
  white-space: nowrap;
}
.lead-extra {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.lead-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  max-width: 520px;
  line-height: 1.45;
}
.lead-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--violet);
  cursor: pointer;
}
.lead-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  flex-wrap: wrap;
}
.lead-socials {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-chat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: transform .3s var(--spring), background .2s, border-color .2s;
  border: 1px solid var(--border);
}
.btn-chat:hover {
  transform: translateY(-2px);
}
.btn-tg {
  background: rgba(34, 158, 217, .12);
  color: #229ed9;
  border-color: rgba(34, 158, 217, .3);
}
.btn-tg:hover {
  background: rgba(34, 158, 217, .24);
  border-color: #229ed9;
}
.btn-vk {
  background: rgba(0, 119, 255, .12);
  color: #2787f5;
  border-color: rgba(0, 119, 255, .3);
}
.btn-vk:hover {
  background: rgba(0, 119, 255, .24);
  border-color: #2787f5;
}
.lead-success {
  padding: 36px 20px;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
  animation: cardIn .5s var(--ease);
}
.lead-success-ic {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 32px;
  box-shadow: 0 10px 30px -8px rgba(34, 197, 94, .4);
}
.lead-success h3 {
  font-size: 24px;
}
.lead-success p {
  color: var(--muted);
  max-width: 480px;
  font-size: 15px;
}

/* --- Истории учеников «Было → Стало» (Кейсы) --- */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.story-card {
  padding: 26px;
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--border);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
}
.story-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-2);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, .4);
}
.story-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.story-student {
  display: flex;
  align-items: center;
  gap: 12px;
}
.story-ava {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 18px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .3);
  flex: none;
}
.story-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.pill-sm {
  padding: 2px 8px;
  font-size: 11px;
}
.story-delta {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.story-progress {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-2);
}
.sp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.sp-after-val {
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-d);
}
.sp-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin-bottom: 4px;
}
.sp-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 1.2s var(--ease);
}
.sp-before {
  background: var(--muted);
  opacity: .7;
}
.sp-after {
  background: var(--grad);
}
.story-quote {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  font-style: italic;
  position: relative;
  padding-left: 14px;
  border-left: 3px solid var(--violet);
  margin: 0;
}
.story-teacher {
  font-size: 13px;
  color: var(--text);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

/* --- FAQ Аккордеон с плавной анимацией раскрытия и сворачивания --- */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}
.faq-item {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .3s, background-color .3s, box-shadow .3s, transform .25s;
}
.faq-item:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .06);
}
.faq-item[open], .faq-item.is-active {
  border-color: color-mix(in srgb, var(--violet) 40%, transparent);
  background: color-mix(in srgb, var(--violet) 3.5%, var(--surface));
  box-shadow: 0 14px 40px -12px rgba(255, 61, 129, .15);
}
.faq-summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 16px;
  user-select: none;
  transition: color .2s;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary:hover {
  color: var(--violet);
}
.faq-ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), background .25s, color .25s;
}
.faq-item[open] .faq-ico, .faq-item.is-active .faq-ico {
  transform: rotate(180deg);
  background: var(--violet);
  color: #fff;
}
.faq-collapse {
  overflow: hidden;
  will-change: height, opacity;
}
.faq-ans {
  padding: 0 24px 24px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.faq-ans p {
  max-width: 780px;
}
/* --- Богатый трастовый футер --- */
.footer {
  margin-top: 110px;
  padding: 60px 0 36px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-2) 60%, var(--bg));
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}
.f-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.f-desc {
  line-height: 1.5;
  color: var(--muted);
  font-size: 13px;
}
.f-contacts {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.f-phone {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .2s;
}
.f-phone:hover {
  color: var(--violet);
}
.f-socials {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.s-link {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform .3s var(--spring), background .2s, color .2s, border-color .2s;
}
.s-link .ic { width: 20px; height: 20px; }
.s-link:hover {
  transform: translateY(-3px) scale(1.05);
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}
.f-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: -.01em;
}
.f-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.f-col a, .f-col .link-btn {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .2s, transform .2s;
  display: inline-block;
  text-align: left;
}
.f-col a:hover, .f-col .link-btn:hover {
  color: var(--text);
  transform: translateX(3px);
}
.legal-links .link-btn {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.pay-trust {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pay-badge {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .02em;
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* --- Бесплатный тест-драйв в курсе и на уроке --- */
.trial-box {
  border: 1.5px dashed color-mix(in srgb, var(--lime) 50%, transparent);
  background: color-mix(in srgb, var(--lime) 8%, var(--surface));
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.trial-box h4 {
  font-size: 16px;
}
.trial-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.trial-divider::before, .trial-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.trial-divider span {
  padding: 0 10px;
}
.program-item.is-trial {
  border-color: color-mix(in srgb, var(--lime) 40%, transparent);
  background: color-mix(in srgb, var(--lime) 5%, var(--surface));
}
.trial-banner {
  margin-bottom: 18px;
  padding: 14px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--lime) 15%, transparent), color-mix(in srgb, var(--pink) 15%, transparent)), var(--surface);
  border: 1px solid color-mix(in srgb, var(--lime) 40%, transparent);
  animation: viewIn .4s var(--ease);
}
.trial-banner-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}
.trial-banner-in span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- Куки-баннер (Cookie consent 152-ФЗ) --- */
.cookie-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 150;
  max-width: 580px;
  width: calc(100% - 48px);
  padding: 14px 18px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--solid) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-2);
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, .5);
  animation: toastIn .4s var(--spring);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.cookie-banner.fade-out {
  opacity: 0;
  transform: translateY(12px) scale(.96);
  pointer-events: none;
}
.cookie-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cookie-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}
.cookie-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cookie-icon .ic {
  width: 16px;
  height: 16px;
}
.cookie-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  margin: 0;
  display: block;
}
.cookie-btn {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 700;
  padding: 9px 18px;
}
.link-btn.inline {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  font-weight: 600;
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .2s;
}
.link-btn.inline:hover {
  color: var(--pink);
}

/* --- Модалка юридических документов --- */
.legal-modal {
  display: grid;
  gap: 16px;
}
.legal-modal h2 {
  font-size: 24px;
  padding-right: 40px;
}
.legal-body {
  max-height: 60vh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  display: grid;
  gap: 14px;
  padding-right: 6px;
}
.legal-body b {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
}

/* --- Админка: статусы заявок и истории --- */
.lead-status-select {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Адаптив для новых компонентов --- */
@media (max-width: 1060px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grade-chips { grid-template-columns: repeat(3, 1fr); }
  .lead-inputs { grid-template-columns: 1fr 1fr; }
  .lead-inputs .btn { grid-column: 1/-1; }
}
@media (max-width: 760px) {
  .proof-grid { grid-template-columns: 1fr; gap: 10px; }
  .proof-card { padding: 18px 16px; }
  .lead-box { padding: 24px 18px; }
  .grade-chips { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .grade-chip { padding: 10px 6px; border-radius: 14px; }
  .gc-name { font-size: 13px; }
  .gc-sub { font-size: 10px; }
  .lead-inputs { grid-template-columns: 1fr; gap: 10px; }
  .lead-inputs .btn { width: 100%; }
  .lead-extra { flex-direction: column; align-items: flex-start; gap: 14px; }
  .stories-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cookie-banner { left: 12px; right: 12px; bottom: 84px; width: auto; max-width: none; padding: 14px 16px; border-radius: 18px; }
  .cookie-in { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-content { align-items: flex-start; }
  .cookie-btn { align-self: stretch; width: 100%; justify-content: center; }
  .trial-banner-in { flex-direction: column; align-items: flex-start; }
  .trial-banner-in .btn { width: 100%; }
}

/* ==========================================================================
   БАНК ЗАДАНИЙ ФИПИ (ЕГЭ, ОГЭ, ВПР) — Стиль по макету Умскул
   ========================================================================== */

.tasks-page-wrap {
  width: 100%;
  min-height: calc(100vh - 76px);
  background: var(--bg);
  padding: 24px 0 80px;
}

.tasks-layout {
  display: grid;
  grid-template-columns: 210px 1fr 290px;
  gap: 24px;
  align-items: start;
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Левая колонка навигации --- */
.tasks-nav-col {
  position: sticky;
  top: 92px;
}
.tasks-nav-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, .04);
}
.tasks-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all .2s var(--ease);
  text-align: left;
  width: 100%;
  user-select: none;
}
.tasks-nav-item:hover {
  background: var(--surface-2);
  transform: translateX(2px);
}
.tasks-nav-item.active {
  background: rgba(255, 61, 129, .1);
  color: var(--pink);
  font-weight: 700;
}
.tasks-nav-item.active .t-nav-ico {
  color: var(--pink);
}
.t-nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color .2s;
}

/* --- Центральная колонка --- */
.tasks-main-col {
  min-width: 0;
}
.tasks-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tasks-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tasks-page-title {
  font-family: var(--font-d);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--text);
}
.tasks-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 13px;
  cursor: help;
  transition: all .2s;
}
.tasks-info-btn:hover {
  color: var(--pink);
  border-color: var(--pink);
}
.btn-reset-tasks {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1.5px solid #bfdbfe;
  background: #ffffff;
  color: #2563eb;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-reset-tasks:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* Строка поиска */
.tasks-search-wrap {
  position: relative;
  margin-bottom: 22px;
}
.tasks-search-input {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 20px 0 46px;
  font-size: 14px;
  outline: none;
  transition: all .25s var(--ease);
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, .04);
}
.tasks-search-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 61, 129, .15);
}
.tasks-search-ico {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* Карточки заданий */
.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, .04);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s;
  animation: cardIn .4s var(--ease) both;
}
.task-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .09);
}
.task-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.t-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.t-badge-exam {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.t-badge-sub {
  background: #ede9fe;
  color: #6d28d9;
}
.t-badge-status {
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.t-badge-status.correct {
  background: #dcfce7;
  color: #15803d;
}
.t-badge-status.wrong {
  background: #fee2e2;
  color: #b91c1c;
}
.t-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}
.task-crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.4;
}
.task-crumbs b {
  color: var(--text);
  font-weight: 600;
}
.task-crumbs .crumb-dot {
  color: var(--faint);
}
.task-body {
  font-size: 15px;
  line-height: 1.72;
  color: var(--text);
  margin-bottom: 22px;
}
.task-body p {
  margin: 0 0 12px;
}
.task-body p:last-child {
  margin-bottom: 0;
}
.task-body ul, .task-body ol {
  margin: 10px 0 14px 22px;
  padding: 0;
}
.task-body li {
  margin-bottom: 6px;
}
.task-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 14px 0;
  background: #fff;
  padding: 8px;
  border: 1px solid var(--border);
  display: block;
}
.task-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px dashed var(--border-2);
}
.task-input-wrap {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}
.task-ans-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: all .2s;
}
.task-ans-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 61, 129, .16);
}
.task-ans-input.correct {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
  color: #15803d !important;
}
.task-ans-input.wrong {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  animation: taskShake .4s var(--ease);
}
.btn-check-task {
  height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-sol-toggle {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all .2s;
}
.btn-sol-toggle:hover {
  border-color: var(--border-2);
  background: var(--surface);
}
.btn-sol-toggle svg {
  transition: transform .25s var(--ease);
}
.btn-sol-toggle.expanded svg {
  transform: rotate(180deg);
}
.btn-fav-task {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  font-size: 18px;
  margin-left: auto;
}
.btn-fav-task:hover {
  color: #eab308;
  border-color: #eab308;
  background: rgba(234, 179, 8, .08);
}
.btn-fav-task.active {
  color: #eab308;
  border-color: #eab308;
  background: rgba(234, 179, 8, .12);
}

/* Аккордеон решения */
.task-sol-panel {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.68;
  animation: taskSolIn .3s var(--ease) both;
}
.sol-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sol-official-ans {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-block;
}
.sol-official-ans code {
  font-size: 15px;
  font-weight: 700;
  color: var(--pink);
  margin-left: 6px;
}

@keyframes taskSolIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes taskShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* --- Правая колонка фильтров --- */
.tasks-filter-col {
  position: sticky;
  top: 92px;
}
.tasks-filter-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, .04);
}
.tasks-filter-box .filter-label {
  display: none !important;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.filter-select {
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}
.filter-select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 61, 129, .15);
}
.filter-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  user-select: none;
  padding: 4px 0;
  color: #1e293b;
}
.filter-checkbox-wrap input[type="checkbox"] {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  accent-color: #ff7a00;
  cursor: pointer;
}
.filter-stats-pill {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* --- Вкладка Пробные варианты --- */
.variants-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 24px;
  text-align: center;
}
.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.variant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  cursor: pointer;
  transition: all .25s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.variant-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, .1);
}

/* --- Вкладка Эмулятор КЕГЭ --- */
.kege-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
}
.kege-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.kege-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.kege-code-area {
  width: 100%;
  height: 380px;
  font-family: monospace;
  font-size: 14px;
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 12px;
  padding: 16px;
  border: none;
  outline: none;
  resize: vertical;
}

/* Адаптив Банка заданий */
@media (max-width: 1200px) {
  .tasks-layout {
    grid-template-columns: 1fr 280px;
  }
  .tasks-nav-col {
    grid-column: 1 / -1;
    position: static;
  }
  .tasks-nav-box {
    flex-direction: row;
    overflow-x: auto;
  }
  .tasks-nav-item {
    white-space: nowrap;
    width: auto;
  }
}
@media (max-width: 860px) {
  .tasks-layout {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }
  .tasks-filter-col {
    position: static;
  }
  .task-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .task-input-wrap {
    max-width: none;
  }
  .btn-check-task, .btn-sol-toggle {
    width: 100%;
    justify-content: center;
  }
  .btn-fav-task {
    margin-left: 0;
    width: 100%;
  }
  .kege-split {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Тренировочные варианты (Умскул-стайл)
   ========================================================= */
.variants-sec-title {
  font-size: 19px;
  font-weight: 700;
  margin: 24px 0 16px;
  color: var(--text);
}
.variants-pro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .variants-pro-grid {
    grid-template-columns: 1fr;
  }
}
.variant-pro-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .2s var(--ease);
}
.variant-pro-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 8px 24px -6px rgba(0,0,0,0.06);
}
.var-badges-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.var-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}
.var-badge.sub-hist { background: #fee2e2; color: #dc2626; }
.var-badge.sub-rus  { background: #ffedd5; color: #ea580c; }
.var-badge.sub-math { background: #dbeafe; color: #2563eb; }
.var-badge.sub-math-base { background: #e0e7ff; color: #4338ca; }
.var-badge.sub-inf  { background: #ede9fe; color: #7c3aed; }
.var-badge.sub-soc  { background: #fef3c7; color: #d97706; }
.var-badge.sub-bio  { background: #dcfce7; color: #16a34a; }
.var-badge.sub-phys { background: #cffafe; color: #0891b2; }
.var-badge.sub-chem { background: #fae8ff; color: #c026d3; }
.var-badge.diff     { background: var(--surface-2); color: var(--muted); }

.var-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}
.var-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.btn-var-run {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #f97316;
  transition: all .2s;
}
.btn-var-run:hover {
  background: #ea580c;
  border-color: #ea580c;
}
.btn-var-run.in-prog {
  background: #f97316;
}

/* Генератор своего варианта */
.generate-variant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
}
.gen-var-content {
  flex: 1;
}
.gen-var-content h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
}
.gen-var-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.gen-var-controls .filter-select {
  min-width: 140px;
}
.gen-var-ill {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 16px;
  color: #4f46e5;
}

/* =========================================================
   Интерфейс решения варианта (Тестирование, Скриншот 2)
   ========================================================= */
.var-testing-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.var-top-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  scrollbar-width: thin;
}
.var-step-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}
.var-step-btn:hover {
  background: var(--surface-2);
}
.var-step-btn.active {
  border: 2px solid #2563eb;
  color: #2563eb;
  background: #eff6ff;
  font-weight: 700;
}
.var-step-btn.answered {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #86efac;
}
.var-step-btn.answered.active {
  border: 2px solid #2563eb;
  background: #dcfce7;
  color: #15803d;
}

.var-testing-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 960px) {
  .var-testing-grid {
    grid-template-columns: 1fr;
  }
}
.var-task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
}
.var-task-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.var-task-head h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.var-task-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 28px;
}
.var-task-body table.tasks-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}
.var-task-body table.tasks-table th,
.var-task-body table.tasks-table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.var-task-body table.tasks-table th {
  background: var(--surface-2);
  font-weight: 600;
}

.var-task-footer {
  margin-top: 24px;
}
.var-input-wrap {
  margin-bottom: 20px;
  max-width: 520px;
}
.var-ans-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: all .2s;
}
.var-ans-input:focus {
  border-color: #2563eb;
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.var-input-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.var-btn-row {
  display: flex;
  gap: 12px;
}
.var-skip-btn {
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 22px;
  font-weight: 600;
}
.var-submit-btn {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
  border-radius: 10px;
  padding: 10px 26px;
  font-weight: 600;
}
.var-submit-btn:hover {
  background: #ea580c;
}

.var-side-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  position: sticky;
  top: 90px;
}
.var-back-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.var-back-link:hover {
  color: var(--text);
}
.var-widget-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.4;
}
.var-timer {
  font-size: 22px;
  font-weight: 700;
  font-family: monospace;
  color: var(--text);
  margin-bottom: 20px;
}
.var-finish-btn {
  width: 100%;
  height: 42px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.var-finish-btn:hover {
  background: #dbeafe;
}

/* Результаты тестирования */
.var-results-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
}
.var-score-banner {
  text-align: center;
  padding: 24px;
  background: var(--surface-2);
  border-radius: 16px;
  margin-bottom: 28px;
}
.var-score-big {
  font-size: 48px;
  font-weight: 800;
  color: var(--text);
}
.var-results-stat-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 14px;
}
.var-stat-pill {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.var-stat-pill.ok { background: #dcfce7; color: #15803d; }
.var-stat-pill.bad { background: #fee2e2; color: #b91c1c; }
.var-stat-pill.skip { background: #f1f5f9; color: #64748b; }

@keyframes tasksSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spinner-ico {
  animation: tasksSpin 0.8s linear infinite;
}
.tasks-scroll-sentinel {
  padding: 24px 10px;
  text-align: center;
  min-height: 48px;
}

/* ========================================================
   CUSTOM SELECT / MODERN FILTER DROPDOWN
   ======================================================== */
.custom-select-wrap {
  position: relative;
  width: 100%;
  font-family: inherit;
  user-select: none;
}

.custom-select-trigger {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.custom-select-trigger:hover {
  border-color: #cbd5e1;
}

.custom-select-wrap.open .custom-select-trigger,
.custom-select-trigger:focus-visible,
.custom-select-wrap:has(.custom-select-search-inp:focus) .custom-select-trigger {
  border-color: #ff7a00 !important;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.14) !important;
  outline: none;
}

.custom-select-val {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.custom-select-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--text);
}

.custom-select-search-inp {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  width: 100% !important;
  font-size: 14px !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  padding: 0 !important;
  margin: 0 !important;
}
.custom-select-search-inp::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
}

.custom-select-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 122, 0, 0.1);
  color: #ea580c;
  flex-shrink: 0;
  white-space: nowrap;
}

.custom-select-arrow {
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1), color .2s;
}

.custom-select-wrap.open .custom-select-arrow {
  transform: rotate(180deg);
  color: #64748b;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 99999;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 4px;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  animation: customDropdownFadeIn .16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes customDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-select-wrap.open .custom-select-menu {
  display: block;
}

.custom-select-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #1e293b;
  transition: background .12s ease, color .12s ease;
}

.custom-select-opt:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.custom-select-opt.selected {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 500;
}

.custom-select-opt-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.custom-select-opt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}

.custom-select-opt-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-opt-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
  transition: all .15s;
}

.custom-select-opt:hover .custom-select-opt-badge,
.custom-select-opt.selected .custom-select-opt-badge {
  background: rgba(255, 122, 0, 0.12);
  border-color: rgba(255, 122, 0, 0.25);
  color: #ea580c;
}

.custom-select-menu::-webkit-scrollbar {
  width: 6px;
}
.custom-select-menu::-webkit-scrollbar-track {
  background: transparent;
}
.custom-select-menu::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.custom-select-menu::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.filter-group {
  position: relative;
}
.filter-group:has(.custom-select-wrap.open) {
  z-index: 99999 !important;
}
.custom-select-wrap.open {
  z-index: 99999 !important;
}
.custom-select-menu {
  background-color: var(--surface) !important;
  opacity: 1 !important;
}
[data-theme="light"] .custom-select-menu,
:root:not([data-theme="dark"]) .custom-select-menu {
  background-color: #ffffff !important;
}
[data-theme="dark"] .custom-select-menu {
  background-color: #151926 !important;
}

/* ========================================================
   CASCADING / DEPENDENT SELECT & CLEAR (x) STYLES
   ======================================================== */
.custom-select-wrap.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.custom-select-wrap.disabled .custom-select-trigger {
  cursor: not-allowed;
  background: var(--bg);
  border-color: var(--border);
  box-shadow: none;
}

.custom-select-right-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.custom-select-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: #94a3b8 !important;
  color: #ffffff !important;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}

.custom-select-clear:hover {
  background: #64748b !important;
  color: #ffffff !important;
  transform: scale(1.08);
}

/* ========================================================
   UMSCHOOL-STYLE MULTI-SELECT CHECKBOXES & PLACEHOLDERS
   ======================================================== */
.custom-select-val.placeholder-active .custom-select-title {
  color: #94a3b8 !important;
  font-weight: 400;
}

.custom-select-cb-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  cursor: pointer;
  user-select: none;
}

.custom-select-fake-cb {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1.5px;
  transition: all .15s ease;
}

.custom-select-fake-cb.checked {
  background: #ff7a00 !important;
  border-color: #ff7a00 !important;
}

.custom-select-opt.multi-opt {
  padding: 8px 10px;
  align-items: flex-start;
}

.custom-select-opt.multi-opt:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.custom-select-opt.multi-opt.selected {
  background: #f8fafc;
}

.custom-select-opt.multi-opt .custom-select-opt-name {
  white-space: normal;
  line-height: 1.35;
  font-size: 13.5px;
  color: #1e293b;
  word-break: break-word;
  overflow: visible;
  text-overflow: clip;
}


/* Банк заданий: чекбоксы фильтров неактивны, пока не выбраны Экзамен и Предмет (как в Умскул) */
.filter-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.filter-checkbox-wrap.disabled {
  opacity: .45;
  cursor: not-allowed;
}
.filter-checkbox-wrap.disabled input[type="checkbox"] {
  cursor: not-allowed;
}

/* ===== Тесты: новые типы вопросов, баллы, таймер ===== */
.q-pts { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--surface-3); }
.q-html { font-size: 15px; line-height: 1.55; overflow-x: auto; }
.q-html img { max-width: 100%; height: auto; border-radius: 10px; }
.q-html table { border-collapse: collapse; margin: 8px 0; }
.q-html td, .q-html th { border: 1px solid var(--border); padding: 6px 10px; vertical-align: top; }
.q-img { display: block; max-width: min(100%, 560px); max-height: 420px; object-fit: contain; border-radius: 14px; margin: 6px 0 12px; border: 1px solid var(--border); background: #fff; }
.q-card.partial { border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.q-card.pending { border-color: color-mix(in srgb, var(--cyan) 55%, transparent); }
.partial .q-mark { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.pending .q-mark { background: color-mix(in srgb, var(--cyan) 18%, transparent); }

.match { display: grid; gap: 12px; }
.match-right { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-size: 14px; }
.match-right b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--surface-3); margin-right: 6px; font-size: 12px; }
.match-rows { display: grid; gap: 8px; }
.match-row { display: grid; grid-template-columns: auto 1fr 90px; gap: 10px; align-items: center; }
.match-row .select { min-height: 40px; padding: 6px 10px; }
.match-res { display: grid; gap: 6px; font-size: 14px; }
.match-res .ok b { color: var(--ok); }
.match-res .bad b { color: var(--bad); }

.order-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: ord; }
.order-item { counter-increment: ord; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); cursor: grab; user-select: none; }
.order-item::before { content: counter(ord); font-family: var(--font-d); font-size: 12px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); flex: none; }
.order-item.dragging { opacity: .5; }
.order-item .grip { color: var(--muted); letter-spacing: -2px; }
.order-t { flex: 1; }
.order-btns { display: flex; gap: 4px; }
.ans-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; font-size: 14px; }
.ans-cols li.ok { color: var(--ok); }
.ans-cols li.bad { color: var(--bad); }

.crit-hint { font-size: 13px; margin: 4px 0 10px; }
.crit-hint summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.crit-hint ul { margin: 8px 0 0 18px; }
.long-files { display: grid; gap: 8px; margin: 10px 0; }
.long-ans { display: grid; gap: 8px; font-size: 14px; }
.crit-res { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 13px; }
.crit-res li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }

.quiz-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; }
.quiz-timer { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 99px; background: var(--solid); border: 1px solid var(--border); font-family: var(--font-d); box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .4); }
.quiz-timer.hot { color: var(--red); border-color: var(--red); }
.quiz-start { display: grid; gap: 8px; justify-items: start; }

/* ===== Конструктор ===== */
.qb-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.qb-pts { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.qb-pts .input { width: 70px; min-height: 36px; padding: 4px 10px; }
.qb-opt .qb-max { width: 80px; flex: none; }
.qb-n { width: 26px; text-align: center; font-family: var(--font-d); font-size: 12px; flex: none; }
.qb-opt .qb-sel { width: 80px; flex: none; min-height: 42px; }
.qb-match { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.qb-match > div { display: grid; gap: 8px; align-content: start; }
.qb-img { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qb-img img { max-height: 120px; border-radius: 10px; border: 1px solid var(--border); }
.bank-q { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.file-row.editing { outline: 2px solid var(--violet); }
.bank-filters { display: grid; grid-template-columns: 110px 1fr 140px 1.4fr; gap: 8px; margin: 12px 0; }
.bank-list { display: grid; gap: 10px; max-height: 60vh; overflow: auto; padding-right: 4px; }
.bank-item { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); display: grid; gap: 8px; justify-items: start; }
.bank-item p { font-size: 14px; margin: 0; }
.bank-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 720px) {
  .bank-filters { grid-template-columns: 1fr 1fr; }
  .match-row { grid-template-columns: auto 1fr 70px; }
}

/* ===== Проверка работ ===== */
.t-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.t-filters .select, .t-filters .input { min-height: 40px; padding: 6px 12px; }
.quiz-sum { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.long-review { padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); display: grid; gap: 10px; margin-bottom: 12px; }
.crit-score { display: grid; gap: 8px; }
.crit-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; }
.crit-pick { display: flex; gap: 4px; flex-wrap: wrap; }
.crit-pick button { min-width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: inherit; font-family: var(--font-d); font-size: 13px; cursor: pointer; }
.crit-pick button.active { background: var(--violet); border-color: var(--violet); color: #fff; }
.crit-pick button:disabled { cursor: default; }
.thumb-img { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.thumb .mark-btn { position: absolute; top: 8px; right: 8px; }
.mark-files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.mark-thumb { position: relative; display: block; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; border: 2px solid var(--red); }
.mark-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mark-thumb .x-btn { position: absolute; top: 4px; right: 4px; background: var(--solid); }
.annot { display: grid; gap: 10px; }
.annot-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-right: 48px; } /* место под крестик окна */
.annot-color { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--solid); cursor: pointer; box-shadow: 0 0 0 1px var(--border); }
.annot-color.active { box-shadow: 0 0 0 3px var(--violet); }
.annot-bar .annot-w { width: auto; min-height: 36px; padding: 4px 10px; }
.annot-stage { max-height: 70vh; overflow: auto; border-radius: 14px; border: 1px solid var(--border); background: #fff; }
.annot-stage canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }

/* ===== Материалы урока в конструкторе ===== */
.mat-list { display: grid; gap: 8px; margin-bottom: 10px; }
.mat-row { align-items: center; }
.mat-fields { display: grid; gap: 6px; min-width: 0; }
.mat-fields .input { min-height: 40px; padding: 6px 12px; }
.mat-drop { display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center; padding: 18px; border-radius: 18px; border: 2px dashed var(--border); color: var(--muted); font-size: 13px; cursor: pointer; margin-bottom: 8px; transition: border-color .2s, background .2s; }
.mat-drop:hover, .mat-drop.drag { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 6%, transparent); color: inherit; }
.mark-doc { width: 100%; }

/* ===== Личный кабинет ===== */
.user-slot { gap: 8px; }
.bell-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: inherit; display: grid; place-items: center; cursor: pointer; }
.bell-btn:hover { border-color: var(--violet); }
.bell-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--solid); }
.notif-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; border-radius: 20px; background: var(--solid); border: 1px solid var(--border); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); animation: menuIn .28s var(--spring); }
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; position: sticky; top: 0; background: var(--solid); }
.np-list { display: grid; padding: 4px 8px 10px; }
.np-item { all: unset; display: flex; gap: 10px; padding: 10px; border-radius: 14px; cursor: pointer; }
.np-item:hover { background: var(--surface-2); }
.np-item.unread { background: color-mix(in srgb, var(--violet) 8%, transparent); }
.np-item.unread b::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); margin-left: 6px; vertical-align: middle; }
.np-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.np-body { display: grid; gap: 2px; font-size: 13px; min-width: 0; }
.np-body small { font-size: 12px; overflow-wrap: anywhere; }
button.avatar.has-img { padding: 0; overflow: hidden; }
button.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ava-img, .ava-letter { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 16px; overflow: hidden; flex: none; background: var(--grad); color: #fff; font-family: var(--font-d); font-size: 18px; }
.ava-img img { width: 100%; height: 100%; object-fit: cover; }
.ava-img.lg, .ava-letter.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 26px; }
.ava-img.xl, .ava-letter.xl { width: 104px; height: 104px; border-radius: 28px; font-size: 40px; }
.dash-hello { display: flex; gap: 16px; align-items: center; }
.dash-hello h1 { margin: 6px 0 0; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dash-stats .tile { position: relative; }
.week-dots span.today { opacity: 1; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }
.act-chart { display: grid; grid-template-columns: repeat(28, 1fr); gap: 3px; align-items: end; height: 120px; margin-top: 8px; }
.act-col { height: 100%; display: flex; align-items: flex-end; border-radius: 6px; background: var(--surface-2); }
.act-col i { display: block; width: 100%; border-radius: 6px; background: var(--grad); min-height: 0; }
.act-col.on { background: color-mix(in srgb, var(--violet) 10%, var(--surface-2)); }
.act-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }

.hw-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.hw-filters .seg { flex-wrap: wrap; }
.hw-filters .select { width: auto; min-width: 180px; min-height: 42px; padding: 6px 12px; }
.seg-n { font-size: 11px; opacity: .7; margin-left: 4px; }
.hw-list { display: grid; gap: 10px; }
.hw-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; text-decoration: none; color: inherit; transition: transform .25s var(--ease), border-color .25s; }
.hw-card:hover { transform: translateY(-2px); border-color: var(--violet); }
.hw-main { display: grid; gap: 4px; min-width: 0; }
.hw-main small { color: var(--muted); }
.hw-comment { font-size: 13px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); display: flex; gap: 6px; align-items: flex-start; }
.hw-side { display: grid; gap: 6px; justify-items: end; text-align: right; }
.hw-side small { font-size: 12px; color: var(--muted); }
.hw-side small.bad { color: var(--bad); font-weight: 700; }

.prof-ava { display: flex; gap: 18px; align-items: center; margin: 8px 0 18px; flex-wrap: wrap; }
.prof-ava-btns { display: grid; gap: 8px; justify-items: start; }

@media (max-width: 900px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .hw-card { grid-template-columns: 36px 1fr; }
  .hw-side { grid-column: 1 / -1; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; }
}

/* Переключатели-фильтры без «капли»: активная вкладка подсвечивается фоном */
.seg.seg-plain button.active { background: var(--grad) !important; }

/* ===== Видео: загрузка в конструкторе ===== */
.vid-drop { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px; border-radius: 18px; border: 2px dashed var(--border); color: var(--muted); font-size: 13px; cursor: pointer; margin-bottom: 8px; transition: border-color .2s, background .2s; }
.vid-drop b { color: var(--text, inherit); font-size: 15px; }
.vid-drop:hover, .vid-drop.drag { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 6%, transparent); }
.vid-box { display: grid; grid-template-columns: minmax(0, 280px) 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.vid-box.uploading { display: grid; grid-template-columns: 1fr; gap: 8px; }
.vid-preview { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 16/9; }
.vid-meta { display: grid; gap: 6px; }
.vid-meta small { color: var(--muted); }
.vid-up-head, .vid-up-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.vid-up-head span, .vid-up-foot span { color: var(--muted); }
.vid-progress { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.vid-progress i { display: block; height: 100%; background: var(--grad); transition: width .3s; }
@media (max-width: 720px) { .vid-box { grid-template-columns: 1fr; } }

/* ===== Плеер ===== */
.tl-buf { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 255, 255, .28); border-radius: inherit; }
.tl-track { position: relative; }
.p-spinner { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: pspin .8s linear infinite; display: none; pointer-events: none; z-index: 3; }
.player.buffering .p-spinner { display: block; }
@keyframes pspin { to { transform: rotate(360deg); } }
.vol-wrap { display: inline-flex; align-items: center; gap: 4px; }
.vol { width: 0; opacity: 0; transition: width .25s, opacity .25s; accent-color: #fff; }
.vol-wrap:hover .vol, .vol:focus { width: 80px; opacity: 1; }
.tap-zone { position: absolute; top: 0; bottom: 0; width: 35%; z-index: 2; display: none; }
.tap-zone.left { left: 0; } .tap-zone.right { right: 0; }
@media (hover: none) and (pointer: coarse) { .tap-zone { display: block; } .vol-wrap .vol { display: none; } }

/* ===== Заметки к уроку ===== */
.note-add { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 12px; }
.note-t { font-family: 'Courier New', monospace; font-weight: 800; padding: 8px 10px; border-radius: 10px; background: var(--surface-3); }
.note-list { display: grid; gap: 6px; }
.note-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.note-seek { all: unset; cursor: pointer; }
.note-seek code { font-weight: 800; padding: 3px 8px; border-radius: 8px; background: var(--surface-3); }
.note-seek:hover code { background: var(--violet); color: #fff; }
.note-text { font-size: 14px; overflow-wrap: anywhere; }
