@font-face {
  font-family: "SF Pro Rounded";
  src: local("SF Pro Rounded Regular"), local("SFProRounded-Regular"),
    local("SF Pro Rounded");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Rounded";
  src: local("SF Pro Rounded Medium"), local("SFProRounded-Medium");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Rounded";
  src: local("SF Pro Rounded Semibold"), local("SFProRounded-Semibold");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Rounded";
  src: local("SF Pro Rounded Bold"), local("SFProRounded-Bold"),
    url("/fonts/SF-Pro-Rounded-Heavy.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Rounded";
  src: url("/fonts/SF-Pro-Rounded-Heavy.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: only light;
  --blue: #0172b6;
  --blue-soft: #e7f3fb;
  --blue-mid: #4aa0d2;
  --ink: #032c3f;
  --nav: #345665;
  --muted: #667f8c;
  --line: #e5e9eb;
  --bg: #fcfdff;
  --pill: #eef3f6;
  --shadow: 0 18px 50px rgba(3, 44, 63, 0.08);
  --radius: 24px;
  --container: 1160px;
  --header-h: 88px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "SF Pro Rounded", ui-rounded, Nunito, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--header-h);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(252, 253, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.header.is-scrolled {
  box-shadow: 0 8px 24px rgba(3, 44, 63, 0.06);
  border-bottom-color: rgba(229, 233, 235, 0.8);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo__name {
  display: none;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo:hover img {
  transform: rotate(-8deg) scale(1.08);
}

.nav {
  display: flex;
  align-items: center;
  margin-left: 12px;
  flex: 1;
}

.nav__links {
  display: flex;
  gap: 28px;
}

.nav__panel {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav__links a {
  color: var(--nav);
  font-size: 15px;
  font-weight: 600;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav__links a:hover {
  color: var(--blue);
}

.nav__links a:hover::after,
.nav__links a.is-active::after {
  transform: scaleX(1);
}

.nav__links a.is-active {
  color: var(--blue);
}

.lang {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}

.lang__btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang__btn:hover {
  color: var(--ink);
}

.lang__btn.is-active {
  background: var(--pill);
  color: var(--ink);
  transform: scale(1.04);
}

.link-login {
  color: var(--blue);
  font-weight: 700;
  font-size: 15px;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.link-login:hover {
  color: #015f98;
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease,
    border-color 0.22s ease, filter 0.22s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(1, 114, 182, 0.2);
}

.btn--primary:hover {
  background: #0180cb;
  box-shadow: 0 12px 28px rgba(1, 114, 182, 0.32);
}

.btn--ghost {
  background: #fff;
  color: var(--blue);
  border-color: #b7d7eb;
}

.btn--ghost:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.btn--soft {
  background: var(--blue-soft);
  color: var(--blue);
  padding: 10px 18px;
  font-size: 14px;
}

.btn--soft:hover {
  background: #d7eef9;
}

.btn--lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 16px;
}

.nav__cta {
  min-height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
  min-height: 52px;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 25;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.burger:hover {
  border-color: #b7d7eb;
  background: var(--blue-soft);
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.header.is-open .burger {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 4px 16px rgba(1, 114, 182, 0.15);
}

.header.is-open .burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header.is-open .burger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.header.is-open .burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.is-menu-open main,
body.is-menu-open .footer {
  filter: blur(8px);
}

.nav__backdrop {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 28px;
}

.hero__top {
  position: relative;
}

.hero__copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 8px 0 28px;
}

.hero__visual {
  position: relative;
  z-index: 1;
  margin-top: -8px;
  padding: 0 16px 12px;
}

.hero__decor {
  position: absolute;
  left: 50%;
  top: -120px;
  width: min(1774px, 140%);
  max-width: none;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 78%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 78%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  mask-composite: intersect;
}

.hero__device {
  position: relative;
  z-index: 1;
  display: block;
  width: min(960px, 92%);
  height: auto;
  margin: 0 auto;
}

.hero__caption {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  margin: 8px auto 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--nav);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 22px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ccb6e;
  box-shadow: 0 0 0 4px rgba(60, 203, 110, 0.15);
}

.hero h1 {
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}

.hero h1 span {
  color: var(--blue);
}

.hero__lead {
  margin: 22px auto 28px;
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.courses {
  padding: 40px 0 80px;
}

.courses__head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 28px;
}

.courses__head .pill {
  margin-bottom: 16px;
}

.courses__head h2,
.about h2,
.how h2,
.books h2,
.contact h2 {
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.courses__head p:not(.pill),
.how__lead,
.books__head p:not(.pill),
.contact__lead,
.about__content > p:not(.pill) {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #f3f6f8;
  border-radius: 999px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 28px;
}

.tabs__btn {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.tabs__btn:hover {
  color: var(--blue);
}

.tabs__btn.is-active {
  background: var(--ink);
  color: #fff;
  transform: scale(1.03);
}

.tabs a.tabs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 40px rgba(3, 44, 63, 0.1);
  border-color: #d5e8f3;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card__media img {
  transform: scale(1.05);
}

.card.is-hidden {
  display: none;
}

.card__media {
  position: relative;
  aspect-ratio: 414 / 276;
  overflow: hidden;
}

.card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.card__body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card__kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card h3 {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.card__text,
.card__meta {
  color: var(--muted);
  font-size: 15px;
}

.card__foot {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__foot strong {
  display: block;
  font-size: 20px;
}

.card__foot span {
  color: var(--muted);
  font-size: 13px;
}

.courses__more {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.courses__more .btn {
  min-height: 48px;
  padding: 0 22px;
}

.about {
  padding: 40px 0 80px;
}

.about__grid,
.how__grid,
.contact__grid,
.books__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about__art img,
.how__art img {
  width: min(560px, 100%);
  margin: 0 auto;
}

p.pill,
.pill {
  display: inline-flex;
  align-items: center;
  background: rgba(1, 114, 182, 0.12);
  color: #24678f;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.about__content h2,
.how h2,
.books h2,
.tariffs h2,
.contact h2 {
  margin-bottom: 16px;
}

.about__content > p + p {
  margin-top: 14px;
}

.about__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.about__split h3,
.how__list h3,
.book h3,
.form h3,
.contact__list strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.about__split p,
.how__list p,
.book p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 15px;
}

.stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid #edf1f4;
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stats div {
  padding: 32px 20px;
  text-align: center;
}

.stats div + div {
  border-left: 1px solid #edf1f4;
}

.stats strong {
  display: block;
  color: var(--blue);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.stats span {
  color: var(--muted);
  font-size: 15px;
}

.how {
  padding: 20px 0 80px;
}

.how__list {
  list-style: none;
  margin-top: 28px;
}

.how__list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.how__list li.is-featured {
  background: var(--blue-soft);
  border: 0;
  border-radius: 22px;
  padding: 22px 24px;
  margin-bottom: 8px;
}

.tariffs {
  padding: 20px 0 80px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.tariffs__card {
  background: #fff;
  border: 1px solid #edf1f4;
  border-radius: 36px;
  box-shadow: var(--shadow);
  padding: 36px 36px 28px;
}

.tariffs__head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.tariffs h2 {
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.tariffs__head p:not(.pill) {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  padding-bottom: 6px;
}

.tariffs__tabs {
  display: flex;
  gap: 8px;
  background: #f3f6f8;
  border-radius: 999px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
}

.tariffs__tab {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 999px;
  cursor: pointer;
  min-width: 120px;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.tariffs__tab:hover {
  color: var(--blue);
}

.tariffs__tab.is-active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(1, 114, 182, 0.22);
}

.tariffs__plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

.tariffs__plans[hidden] {
  display: none !important;
}

.tariff {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e7eef3;
  border-radius: 28px;
  padding: 22px 22px 20px;
  cursor: pointer;
  min-height: 100%;
  min-width: 0;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.22s ease;
}

.tariff:hover {
  transform: translateY(-2px);
  border-color: #cfe3f0;
}

.tariff.is-selected {
  background: #eaf5fc;
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(1, 114, 182, 0.1);
}

.tariff__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.tariff__badge {
  display: inline-flex;
  align-items: center;
  background: #eef3f6;
  color: #5d7380;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.tariff.is-selected .tariff__badge:not(.tariff__badge--hot) {
  background: #d7ebf7;
  color: #24678f;
}

.tariff__badge--hot {
  background: var(--blue);
  color: #fff;
}

.tariff__radio {
  width: 22px;
  height: 22px;
  border: 2px solid #c9d7df;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  background: #fff;
}

.tariff.is-selected .tariff__radio {
  border-color: var(--blue);
}

.tariff.is-selected .tariff__radio::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--blue);
}

.tariff__term {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.tariff__price {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
}

.tariff__price span {
  font-size: 0.72em;
}

.tariff__note {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5edf2;
}

.tariff.is-selected .tariff__note {
  border-bottom-color: #d3e6f2;
}

.tariff__subjects {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 0 0 22px;
  flex: 1;
}

.tariff__subjects li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.tariff__subjects svg {
  flex-shrink: 0;
  color: var(--blue);
}

.tariff__pick {
  min-height: 48px;
  margin-top: auto;
}

.tariffs__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 16px 18px 16px 22px;
  border: 1px solid #e7eef3;
  border-radius: 24px;
  background: #fff;
}

.tariffs__bar-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.tariffs__bar-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tariffs__pay {
  min-height: 52px;
  padding: 0 26px;
  flex-shrink: 0;
}

.books {
  padding: 20px 0 80px;
}

.books__head {
  align-items: end;
  margin-bottom: 32px;
}

.books__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.book {
  text-align: left;
}

.book__cover {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  min-height: 280px;
  height: 280px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.book__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.book__info {
  min-width: 0;
}

.book__info p {
  margin: 0 0 6px;
}

.book__info strong {
  font-size: 1.05rem;
}

.books__row {
  position: relative;
}

.books__row--scroll {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.books__grid--scroll {
  display: flex;
  grid-template-columns: unset;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 18px;
  padding: 4px 4px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.books__grid--scroll::-webkit-scrollbar {
  display: none;
}

.books__grid--scroll .book {
  flex: 0 0 calc((100% - 54px) / 4);
  max-width: 280px;
  min-width: 220px;
  scroll-snap-align: start;
}

.books__arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 40, 80, 0.06);
}

.books__arrow:hover {
  border-color: rgba(15, 40, 80, 0.25);
}

.books__empty {
  grid-column: 1 / -1;
  padding: 28px 20px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
  color: inherit;
  opacity: 0.85;
}

.contact {
  padding: 10px 0 40px;
}

.contact__list {
  list-style: none;
  margin-top: 32px;
  display: grid;
  gap: 22px;
}

.contact__list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact__list small,
.contact__list span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.contact__list strong {
  display: block;
  margin: 2px 0;
}

.ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-soft) center / 18px no-repeat;
  flex: 0 0 40px;
}

.ico-phone {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='%230172b6' viewBox='0 0 24 24'><path d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.2 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z'/></svg>");
}

.ico-mail {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%230172b6' stroke-width='2' viewBox='0 0 24 24'><rect x='3' y='5' width='18' height='14' rx='2'/><path d='M3 7l9 6 9-6'/></svg>");
}

.ico-pin {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='%230172b6' viewBox='0 0 24 24'><path d='M12 2a7 7 0 00-7 7c0 5.3 7 13 7 13s7-7.7 7-13a7 7 0 00-7-7zm0 9.5A2.5 2.5 0 119.5 9 2.5 2.5 0 0112 11.5z'/></svg>");
}

.form {
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
  border: 1px solid #f0f3f6;
}

.form p {
  color: var(--muted);
  margin: 8px 0 18px;
}

.form label,
.form__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.form input,
.form textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.form textarea {
  resize: vertical;
  min-height: 92px;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--blue-mid);
}

.form .password-field {
  display: flex;
  align-items: center;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.form .password-field:focus-within {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 4px rgba(1, 114, 182, 0.12);
}

.form .password-field input {
  width: 0;
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}

.form .password-field input:focus {
  border-color: transparent;
  box-shadow: none;
}

.password-toggle {
  display: none;
  flex: 0 0 42px;
  width: 42px;
  height: 44px;
  margin-right: 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  place-items: center;
}

.password-field.is-filled .password-toggle {
  display: grid;
}

.password-toggle:hover {
  color: var(--ink);
}

.password-toggle__hide {
  display: none;
}

.password-toggle.is-on .password-toggle__show {
  display: none;
}

.password-toggle.is-on .password-toggle__hide {
  display: block;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 18px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  margin: 0;
}

.choice input {
  width: auto;
  margin: 0;
}

.form__ok {
  background: var(--blue-soft);
  color: var(--blue) !important;
  border-radius: 12px;
  padding: 12px 14px;
}

.footer {
  padding: 0 0 36px;
  margin-top: auto;
  width: 100%;
  flex-shrink: 0;
}

.footer__card {
  background: var(--blue);
  color: #fff;
  border-radius: 32px;
  padding: 48px 48px 28px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 14px;
}

.footer__logo img {
  width: 40px;
  height: 40px;
}

.footer__brand p,
.footer a,
.footer span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}

.footer__grid h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

.footer__grid a,
.footer__grid button,
.footer__address {
  display: block;
  margin: 8px 0;
  background: none;
  border: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer__address {
  cursor: default;
}

.footer__grid a:hover,
.footer__grid button:hover,
.footer__bottom a:hover {
  color: #fff;
  transform: translateX(3px);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  font-size: 13px;
}

.auth,
.legal,
.auth--admin {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 48px 16px;
}

.form--auth {
  width: min(440px, 100%);
}

.auth__logo {
  width: 48px;
  margin-bottom: 12px;
}

.auth h1,
.legal h1 {
  font-size: 36px;
  letter-spacing: -0.03em;
}

.auth__alt {
  text-align: center;
  margin-top: 16px;
}

.auth__alt a {
  color: var(--blue);
  font-weight: 700;
}

.legal .container {
  padding: 48px 0 80px;
}

.legal p {
  color: var(--muted);
  max-width: 720px;
  margin: 16px 0 28px;
}

.admin {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin__side {
  background: var(--blue);
  color: #fff;
  padding: 28px 20px;
}

.admin__side nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  margin-top: 8px;
}

.admin__side .is-active,
.admin__side a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.admin__main {
  padding: 40px;
}

.admin .stats {
  max-width: 560px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 1100px) {
  .logo__name {
    display: block;
  }

  .burger {
    display: block;
    margin-left: auto;
  }

  .nav__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(3, 44, 63, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .header.is-open .nav__backdrop,
  body.is-menu-open .nav__backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 24;
    width: min(360px, 88vw);
    height: 100vh;
    height: 100dvh;
    margin-left: 0;
    flex: unset;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 96px 24px 28px;
    background: #fff;
    box-shadow: -12px 0 48px rgba(3, 44, 63, 0.14);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
  }

  .header.is-open .nav {
    transform: translateX(0);
  }

  .nav__links {
    flex-direction: column;
    gap: 4px;
  }

  .nav__links a {
    font-size: 18px;
    font-weight: 700;
    padding: 14px 16px;
    border-radius: 16px;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .nav__links a::after {
    display: none;
  }

  .nav__links a:hover {
    background: var(--blue-soft);
  }

  .nav__panel {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-top: auto;
    padding-top: 24px;
    margin-left: 0;
    border-top: 1px solid var(--line);
  }

  .nav__actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .nav__login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    border: 1.5px solid #b7d7eb;
    border-radius: 999px;
    background: #fff;
    color: var(--blue);
    box-sizing: border-box;
  }

  .nav__login:hover {
    background: var(--blue-soft);
    transform: none;
  }

  .nav__cta {
    width: 100%;
    min-height: 48px;
  }

  .lang {
    align-self: center;
  }

  .courses__head,
  .about__grid,
  .how__grid,
  .contact__grid,
  .books__head,
  .tariffs__head,
  .cards,
  .books__grid,
  .stats,
  .footer__grid,
  .about__split {
    grid-template-columns: 1fr;
  }

  .tariffs__card {
    padding: 28px 20px 20px;
  }

  .tariffs__plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .stats div + div {
    border-left: 0;
    border-top: 1px solid #edf1f4;
  }

  .cards,
  .books__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__card {
    padding: 32px 24px 20px;
  }

  .admin {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .tariffs__plans {
    grid-template-columns: 1fr;
  }

  .tariffs__tabs {
    width: 100%;
    justify-content: stretch;
  }

  .tariffs__tab {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .cards,
  .choices {
    grid-template-columns: 1fr;
  }

  .tariffs__tabs {
    width: 100%;
    justify-content: stretch;
  }

  .tariffs__tab {
    flex: 1;
    min-width: 0;
    padding: 12px 10px;
  }

  .tariffs__plans {
    grid-template-columns: 1fr;
  }

  .tariff__subjects {
    grid-template-columns: 1fr 1fr;
  }

  .tariffs__bar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .tariffs__pay {
    width: 100%;
  }

  .books__row--scroll {
    grid-template-columns: 1fr;
  }

  .books__arrow {
    display: none;
  }

  .books__grid,
  .books__grid--scroll {
    display: flex;
    grid-template-columns: unset;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    margin-right: -20px;
    padding: 4px 20px 16px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .books__grid--scroll .book {
    flex: 0 0 min(260px, 78vw);
    max-width: none;
    min-width: 0;
  }

  .books__grid::-webkit-scrollbar {
    display: none;
  }

  .book {
    flex: 0 0 min(260px, 78vw);
    scroll-snap-align: start;
  }

  .book__cover {
    min-height: 240px;
    height: 240px;
  }

  .hero__lead br {
    display: none;
  }

  :root {
    --header-h: 72px;
  }
}

.header.is-scrolled .header__inner {
  min-height: var(--header-h);
}

.dot {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(60, 203, 110, 0.15);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(60, 203, 110, 0.08);
  }
}

.float-art {
  animation: floaty 4.5s ease-in-out infinite;
}

.float-art--slow {
  animation-duration: 5.5s;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.how__list li {
  transition: background 0.25s ease, transform 0.25s ease, border-radius 0.25s ease;
  cursor: default;
}

.how__list li:hover {
  background: var(--blue-soft);
  border-radius: 22px;
  padding-left: 18px;
  padding-right: 18px;
  transform: translateX(4px);
}

.book {
  transition: transform 0.3s ease;
}

.book:hover {
  transform: translateY(-6px);
}

.book__cover {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.book:hover .book__cover {
  box-shadow: 0 16px 32px rgba(3, 44, 63, 0.08);
}

.choice {
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.choice:hover,
.choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.form input,
.form textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 4px rgba(1, 114, 182, 0.12);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-inview {
  opacity: 1;
  transform: none;
}

.hero__copy {
  animation: heroIn 0.7s ease both;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 44, 63, 0.38);
  backdrop-filter: blur(6px);
  animation: fadein 0.25s ease;
}

.modal__card {
  position: relative;
  width: min(440px, 100%);
  margin: auto;
  flex-shrink: 0;
  max-width: 100%;
  background: #fff;
  border-radius: 28px;
  padding: 32px 28px 24px;
  box-shadow: var(--shadow);
  animation: popin 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: var(--pill);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.2s ease, background 0.2s ease;
}

.modal__close:hover {
  transform: rotate(90deg);
  background: var(--blue-soft);
}

.modal__logo {
  width: 40px;
  margin-bottom: 12px;
}

.modal__card h2 {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.modal__card > p,
.auth__alt {
  color: var(--muted);
  margin: 8px 0 16px;
}

.auth__alt a {
  color: var(--blue);
  font-weight: 700;
}

.form--modal {
  box-shadow: none;
  border: 0;
  padding: 0;
}

@keyframes fadein {
  from {
    opacity: 0;
  }
}

@keyframes popin {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

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

.header--auth .logo__name {
  display: block;
}

.header--auth .header__inner {
  justify-content: space-between;
}

.header__auth-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--nav);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.auth-back:hover {
  color: var(--blue);
}

.auth-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 24px 0 64px;
}

.auth-page--register {
  align-items: flex-start;
  padding-top: 8px;
}

.auth-page__grid {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}

.auth-card {
  width: 100%;
  padding: 36px 32px 28px;
  border-radius: 28px;
}

.auth-card h1 {
  font-size: 30px;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.page-register .auth-card h1 {
  font-size: 28px;
}

.auth-card h1 + label,
.auth-card h1 + .auth-card__lead + label {
  margin-top: 8px;
}

.auth-card .auth-card__lead {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 20px !important;
  line-height: 1.45;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 40px 14px 16px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23667f8c' d='M1 1.5 6 6.5 11 1.5'/></svg>") no-repeat right 16px center;
  color: var(--ink);
  outline: none;
  appearance: none;
  font: inherit;
}

.form select:focus {
  border-color: var(--blue-mid);
}

.auth-hint {
  color: var(--muted) !important;
  font-size: 13px;
  margin: -4px 0 14px !important;
}

.auth-card .btn--block {
  margin-top: 4px;
}

.auth-card .auth__alt {
  margin: 16px 0 0;
  text-align: center;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f3f6f8;
  border-radius: 16px;
  padding: 6px;
  margin: 0 0 22px;
}

.role-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--nav);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  min-height: 46px;
  border-radius: 12px;
  cursor: pointer;
}

.role-switch__btn.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(3, 44, 63, 0.08);
}

.parent-box {
  background: #eef7fc;
  border-radius: 22px;
  padding: 28px 22px 22px;
  text-align: center;
}

.parent-box__ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  color: var(--blue);
}

.parent-box h2 {
  font-size: 20px;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.parent-box p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.parent-box__call {
  display: block;
  margin-top: 14px;
  color: var(--blue);
  font-weight: 700;
  font-size: 15px;
}

.auth-art {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.auth-art img {
  width: min(560px, 100%);
  height: auto;
}

.catalog {
  padding: 12px 0 72px;
  flex: 1 0 auto;
  width: 100%;
}

.catalog__head {
  margin-bottom: 22px;
}

.catalog__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.catalog__head h1 {
  font-size: 40px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.catalog__head p {
  color: var(--muted);
  max-width: 520px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 500;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 360px;
  width: 100%;
  margin: 8px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
}

.search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.exam-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exam-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(3, 44, 63, 0.04);
  overflow: hidden;
}

.exam-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 14px 16px;
  box-shadow: none;
}

.exam-results {
  display: grid;
  gap: 8px;
  padding: 0 16px 14px;
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding-top: 12px;
}

.exam-freeze {
  display: grid;
  gap: 2px;
  margin: 0 16px 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7e8;
  border: 1px solid #f0d7a4;
}

.exam-freeze strong {
  color: #c77700;
  font-size: 14px;
}

.exam-freeze span {
  color: #8a651f;
  font-size: 13px;
  font-weight: 600;
}

.exam-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}

.exam-result__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.exam-result__main strong {
  font-size: 14px;
  color: var(--ink);
}

.exam-result__main span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.exam-result__side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.exam-result__points {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.72;
  white-space: nowrap;
}

.exam-row.is-hidden {
  display: none;
}

.exam-row__media {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.exam-row__body {
  min-width: 0;
  flex: 1;
}

.exam-row__tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.exam-row__badge {
  display: inline-flex;
  background: var(--pill);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exam-row__subject {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.exam-row h3 {
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.exam-row p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.exam-row__price {
  text-align: right;
  flex-shrink: 0;
}

.exam-row__price strong {
  display: block;
  font-size: 18px;
}

.exam-row__price span {
  color: var(--muted);
  font-size: 13px;
}

.exam-row__media--empty {
  background: var(--pill);
}

.exam-row__cta {
  min-width: 148px;
  min-height: 44px;
  padding: 0 18px;
  flex-shrink: 0;
  font-size: 14px;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 48px 0 72px;
}

.pager__num,
.pager__btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
  background: #fff;
  border: 1px solid var(--line);
}

.pager__num.is-active {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: transparent;
}

.pager__dots {
  color: var(--muted);
  font-weight: 700;
  padding: 0 4px;
}

.pager__btn.is-disabled {
  opacity: 0.38;
  pointer-events: none;
}

a.pager__num,
a.pager__btn {
  color: inherit;
}

a.pager__num:hover,
a.pager__btn:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.catalog-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed #d5e0e6;
  border-radius: 22px;
  color: var(--muted);
  font-weight: 600;
  background: #f9fbfd;
  margin: 8px 0 48px;
}

@media (max-width: 1100px) {
  .auth-page__grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .auth-art {
    min-height: 0;
    order: -1;
  }

  .auth-art img {
    width: min(360px, 72%);
  }

  .catalog__top {
    flex-direction: column;
  }

  .search {
    max-width: none;
  }

  .catalog__head h1 {
    font-size: 36px;
  }
}

@media (max-width: 720px) {
  .header__auth-tools {
    gap: 10px;
  }

  .header--auth .logo__name {
    display: none;
  }

  .auth-back {
    font-size: 13px;
  }

  .auth-page {
    align-items: flex-start;
    padding-top: 8px;
  }

  .auth-art {
    display: none;
  }

  .auth-card {
    padding: 26px 18px 20px;
  }

  .auth-card h1 {
    font-size: 26px;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .catalog__head h1 {
    font-size: 30px;
  }

  .exam-row {
    flex-wrap: wrap;
  }

  .exam-row__price {
    text-align: left;
    margin-left: 88px;
    width: calc(100% - 88px);
  }

  .exam-row__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .exam-row__cta {
    width: auto;
    min-width: 148px;
    margin-left: 0;
  }
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-flash {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.form-flash--error {
  background: #fdeeee;
  color: #9b2c2c;
}

.form-flash--ok {
  background: var(--blue-soft);
  color: var(--blue);
}

.page-admin {
  padding-top: 0;
}

.admin-shell {
  min-height: 100vh;
  background: var(--bg);
}

.admin-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(252, 253, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.admin-top__inner {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-top .logo__name {
  display: block;
}

.admin-top__badge {
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 12px;
}

.admin-top__user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-top__user span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.admin-logout {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.admin-burger {
  display: none;
  padding: 0;
}

.admin-burger span {
  margin: 0;
}

.admin-nav__logout {
  display: none;
}

.admin-body {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 28px 0 48px;
  align-items: start;
}

.admin-nav {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px 14px;
  position: sticky;
  top: 100px;
}

.admin-nav__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px 10px;
}

.admin-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--nav);
  font-weight: 700;
}

.admin-nav a.is-active,
.admin-nav a:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.admin-nav__backdrop {
  display: none;
}

.admin-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  min-height: 420px;
  min-width: 0;
  max-width: 100%;
  padding: 32px;
}

.admin-main h1 {
  font-size: 32px;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.admin-lead {
  color: var(--muted);
  margin-bottom: 28px;
}

.admin-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px dashed #d5e0e6;
  border-radius: 22px;
  color: var(--muted);
  font-weight: 600;
  background: #f9fbfd;
}

.admin-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 0 -8px;
  padding: 0 8px;
  -webkit-overflow-scrolling: touch;
}

/* Keep horizontal scroll when row menus exist (payments/parents).
   Do not set overflow:visible — that blows out page width. */
.admin-table-wrap:has(.admin-menu) {
  overflow-x: auto;
}

.admin-table td.admin-table__actions {
  width: 56px;
  text-align: right;
  overflow: visible;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
}

.admin-table th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--nav);
  vertical-align: middle;
  white-space: nowrap;
}

.admin-table td:nth-child(1),
.admin-table td:nth-child(2) {
  white-space: normal;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.admin-user__ava {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.admin-user strong {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.3;
}

.admin-muted {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.admin-table td .admin-muted {
  max-width: 22rem;
  white-space: normal;
}

.admin-table td.admin-lead-phone {
  white-space: nowrap;
}

.admin-table td.admin-lead-q {
  white-space: pre-wrap;
  min-width: 220px;
  max-width: 420px;
  line-height: 1.45;
  font-weight: 600;
}

.lead-exam {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.student-modal__card {
  width: min(640px, calc(100vw - 32px));
}

.student-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-pick {
  position: relative;
  margin: 0;
}

.student-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.student-pick span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--nav);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
}

.student-pick input:checked + span {
  background: var(--blue);
  color: #fff;
}

.student-pick input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.student-grant {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.student-grant__item {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f9fbfd;
  cursor: pointer;
}

.student-grant__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.student-grant__item {
  position: relative;
}

.student-grant__item strong {
  color: var(--ink);
  font-size: 15px;
}

.student-grant__item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.student-grant__item:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.student-grant__item:has(input:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .student-grant {
    grid-template-columns: 1fr;
  }
}

.admin-head__actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--blue-soft);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 6px;
}

.admin-code--copy {
  border: 0;
  cursor: pointer;
  display: inline-block;
  max-width: 100%;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-code--copy:hover {
  background: #d7ecfa;
  color: var(--blue);
}

.admin-code--copy.is-copied {
  background: #d9f5e5;
  color: #1b7a45;
}

.admin-menu__list form {
  margin: 0;
}

.admin-menu__list form button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.admin-menu__list form button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.admin-menu__list form .admin-menu__danger {
  color: #c0392b;
}

.admin-menu__list form .admin-menu__danger:hover {
  background: #fdecea;
  color: #c0392b;
}

.parent-student-combo .combo__list button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.parent-student-combo .combo__list button span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.parent-student-combo .combo__list button.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.parent-student-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-creds {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  margin: 12px 0 4px;
  border-radius: 12px;
  background: var(--blue-soft);
  font-size: 14px;
}

.admin-creds .admin-code {
  background: #fff;
}

@media (max-width: 720px) {
  .admin-form__row {
    grid-template-columns: 1fr;
  }

  .admin-row-actions {
    justify-content: stretch;
  }

  .admin-row-actions .btn {
    flex: 1;
  }
}

.cabinet--parent-view .exam-row__cta,
.cabinet--parent-view .learn-hw__form,
.cabinet--parent-view .learn-quiz .btn--primary {
  pointer-events: none;
}

.cabinet-parent-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.admin-chip,
.admin-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-chip {
  background: var(--pill);
  color: var(--nav);
}

.admin-chip--status {
  background: #e8f3fb;
  color: var(--blue);
}

.admin-chip--parent {
  background: #f3eef8;
  color: #6b4f8a;
}

.admin-course {
  position: relative;
}

.admin-course__hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.admin-course .admin-menu {
  position: relative;
  z-index: 2;
}

.admin-course .admin-test__body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-modal__card {
  width: min(560px, calc(100vw - 32px));
  padding: 28px 26px 22px;
  overflow: visible;
  background:
    radial-gradient(circle at 100% 0%, rgba(1, 114, 182, 0.12), transparent 42%),
    #fff;
}

.course-modal__head {
  margin-bottom: 16px;
  padding-right: 28px;
}

.course-modal__badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.course-modal__card h2 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.course-modal__lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.course-form {
  display: grid;
  gap: 12px;
}

.course-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.course-field {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--nav);
}

.course-field > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.course-field input,
.course-field textarea,
.course-field select {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: #f7fbfe;
  outline: none;
}

.course-field textarea {
  min-height: 84px;
  resize: none;
  line-height: 1.45;
}

.course-field input:focus,
.course-field textarea:focus,
.course-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(1, 114, 182, 0.12);
  background: #fff;
}

.course-field .combo input {
  margin: 0;
  background: #f7fbfe;
}

.course-photo {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 120px;
  margin: 0;
  border: 1.5px dashed #9fd0ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #f3f9fd 0%, #fff 70%);
  cursor: pointer;
  overflow: hidden;
}

.course-photo input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.course-photo__empty {
  display: grid;
  gap: 4px;
  text-align: center;
  pointer-events: none;
  padding: 16px;
}

.course-photo__empty strong {
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.course-photo__empty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.course-photo__preview {
  position: absolute;
  inset: 0;
}

.course-photo__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-photo:has(.course-photo__preview:not([hidden])) {
  border-style: solid;
  min-height: 140px;
}

.course-photo:has(.course-photo__preview:not([hidden])) .course-photo__empty {
  display: none;
}

.course-modal__actions {
  margin-top: 4px;
}

.admin-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.admin-crumb a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 800;
}

.admin-crumb a:hover {
  text-decoration: underline;
}

.admin-crumb > span:last-child {
  color: var(--nav);
  font-weight: 800;
}

.admin-course-detail {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: start;
  margin: 18px 0 28px;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.admin-course-detail__media {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--pill);
}

.admin-course-detail__body p {
  margin: 0;
  color: var(--nav);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 600;
  white-space: pre-wrap;
}

.admin-course-sections h2 {
  margin: 0;
  font-size: 22px;
}

.admin-section-list {
  display: grid;
  gap: 12px;
}

.admin-section-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.admin-section-card__hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.admin-section-card .admin-menu {
  position: relative;
  z-index: 2;
}

.admin-section-card__num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
}

.admin-section-card__body {
  min-width: 0;
}

.admin-section-card__body h3 {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.admin-section-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section-modal__card {
  width: min(440px, calc(100vw - 32px));
  padding: 28px 26px 22px;
  overflow: visible;
  background:
    radial-gradient(circle at 100% 0%, rgba(1, 114, 182, 0.12), transparent 42%),
    #fff;
}

.section-modal__head {
  margin-bottom: 16px;
  padding-right: 28px;
}

.section-modal__badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-modal__card h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.section-modal__lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.section-form {
  display: grid;
  gap: 12px;
}

.section-modal__actions {
  margin-top: 4px;
}

.lesson-task__head {
  margin-bottom: 18px;
  padding: 18px 18px 16px;
  border: 1.5px solid #9fd0ef;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(1, 114, 182, 0.14), transparent 46%),
    linear-gradient(180deg, #f3f9fd 0%, #fff 72%);
}

.lesson-task__badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 10px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lesson-task__stack {
  display: grid;
  gap: 16px;
}

.lesson-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(1, 114, 182, 0.05);
}

.lesson-card__head {
  display: grid;
  gap: 4px;
}

.lesson-card__head strong {
  color: var(--nav);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.lesson-card__head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.lesson-field {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--nav);
}

.lesson-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lesson-field input,
.lesson-field select {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: #f7fbfe;
  outline: none;
}

.lesson-field input:focus,
.lesson-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(1, 114, 182, 0.12);
  background: #fff;
}

.lesson-field input[type="file"] {
  padding: 10px 12px;
  background: #fff;
}

.lesson-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #f7fbfe;
}

.lesson-block__label {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lesson-video-preview {
  overflow: hidden;
  border-radius: 16px;
  background: #031c2b;
}

.lesson-video-preview video {
  display: block;
  width: 100%;
  max-height: 320px;
  background: #031c2b;
}

.lesson-file {
  margin: 0;
  color: var(--nav);
  font-size: 14px;
  font-weight: 700;
}

.lesson-file a {
  color: var(--blue);
}

.lesson-video-pane {
  display: grid;
  gap: 10px;
}

.lesson-video-pane[hidden] {
  display: none !important;
}

.lesson-rich {
  display: grid;
  gap: 8px;
}

.lesson-rich__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lesson-rich__input {
  min-height: 120px;
}

.tox .tox-dialog .tox-urlinput {
  min-height: 40px;
}

.lesson-math-preview {
  min-height: 56px;
  margin: 8px 0 4px;
  padding: 12px;
  border: 1.5px dashed #9fd0ef;
  border-radius: 14px;
  background: #f7fbfe;
  overflow-x: auto;
}

.tox-tinymce {
  border-radius: 16px !important;
  border: 1.5px solid var(--line) !important;
}

@media (max-width: 720px) {
  .course-form__row {
    grid-template-columns: 1fr;
  }

  .lesson-card,
  .lesson-task__head {
    padding: 14px;
    border-radius: 18px;
  }

  .admin-course-detail {
    grid-template-columns: 1fr;
  }

  .admin-course-detail__media {
    width: 100%;
    height: 160px;
  }
}

.admin-status.is-ok {
  background: #e8f7ee;
  color: #1c7a45;
}

.admin-status.is-wait {
  background: #fff7e8;
  color: #8a5a12;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.admin-head h1 {
  margin-bottom: 8px;
}

.admin-head .admin-lead {
  margin-bottom: 0;
}

.admin-head .btn {
  min-height: 44px;
  padding: 0 20px;
  flex-shrink: 0;
}

.admin-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-kicker {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.admin-kicker a {
  color: var(--blue);
}

.admin-hint {
  color: var(--muted) !important;
  font-size: 13px;
  font-weight: 600;
  margin: -4px 0 14px !important;
}

.admin-main > .form-flash {
  margin-bottom: 18px;
}

.admin-main .form {
  box-shadow: none;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.form__row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.admin-block {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.admin-block:last-of-type {
  border-bottom: 0;
}

.admin-block h2 {
  font-size: 20px;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.admin-photo {
  width: min(280px, 100%);
  margin: -4px 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #f9fbfd;
}

.admin-photo img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.combo {
  position: relative;
  display: block;
  margin-top: 8px;
}

.combo input {
  margin-top: 0;
}

.combo__list {
  position: absolute;
  z-index: 8;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 6px;
  max-height: 240px;
  overflow: auto;
}

.parent-student-combo .combo__list {
  z-index: 30;
}

#parent-create-modal .modal__card {
  width: min(520px, 100%);
  overflow: visible;
}

.combo__list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.combo__list button:hover,
.combo__create {
  background: var(--blue-soft);
  color: var(--blue);
}

.q-cell {
  background: #f9fbfd;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 14px;
}

.q-cell__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.q-cell__remove,
.q-opt__del {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.q-cell__remove:hover,
.q-opt__del:hover {
  color: #9b2c2c;
}

.q-cell__points {
  max-width: 160px;
}

.q-options {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}

.q-opt {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.q-prompt-rich {
  margin-bottom: 14px;
}

.q-opt--row {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.q-opt--row .q-opt__ok {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 8px 0 0 !important;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #f7fbfe;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.q-opt--row .q-opt__ok input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.q-opt--row .q-opt__ok-mark {
  width: 18px;
  height: 18px;
  border: 2px solid #9ab3c3;
  border-radius: 6px;
  background: #fff;
  position: relative;
}

.q-opt--row .q-opt__ok:has(input:checked) {
  border-color: #1c7a45;
  background: #e8f7ee;
}

.q-opt--row .q-opt__ok:has(input:checked) .q-opt__ok-mark {
  border-color: #1c7a45;
  background: #1c7a45;
}

.q-opt--row .q-opt__ok:has(input:checked) .q-opt__ok-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.q-opt__main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.q-opt--row .q-opt__main input[type="text"] {
  width: 100%;
  min-height: 44px;
  margin: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #f7fbfe;
  font: inherit;
  font-weight: 600;
}

.q-opt--row .q-opt__main input[type="text"]:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(1, 114, 182, 0.12);
}

.q-opt--row .q-opt__preview {
  min-height: 0;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px dashed #9fd0ef;
  background: #f3f9fd;
  overflow-x: auto;
}

.q-opt--row .q-opt__preview[hidden] {
  display: none !important;
}

.q-opt--row .q-opt__main .tox-tinymce {
  min-height: 120px;
}

.q-opt--row .q-opt__math-btn,
.q-opt--row .q-opt__del {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #f7fbfe;
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.q-opt--row .q-opt__math-btn:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.q-opt--row .q-opt__del {
  margin-top: 8px;
  color: #9b2c2c;
  font-size: 24px;
}

.q-opt--row .q-opt__del:hover {
  border-color: #f0c2c2;
  background: #fdeeee;
}

.form .q-opt input[type="text"] {
  margin-top: 0;
}

.form .q-opt input[type="checkbox"],
.form input[type="file"] {
  width: auto;
}

.form input[type="file"] {
  padding: 10px 12px;
}

.q-opt__ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  white-space: nowrap;
  font-size: 13px;
}

.q-opt__ok input {
  margin: 0 !important;
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.q-opt__del {
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
}

.q-cell__add-opt {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.admin-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.admin-form__actions .btn {
  min-height: 48px;
  padding: 0 22px;
}

.admin-shell--editor {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.editor-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(252, 253, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.editor-top__inner {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.editor-top .logo__name {
  display: block;
}

.editor-top h1 {
  font-size: 22px;
  letter-spacing: -0.04em;
  margin: 0;
  font-weight: 800;
  min-width: 0;
}

.editor-top__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.editor-top__actions .btn {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.editor-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.editor-form > .form-flash {
  width: min(1080px, calc(100% - 40px));
  margin: 16px auto 0;
}

.editor-wrap {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 8px 0 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.editor-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.editor-tabs__qs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--nav);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease;
}

.editor-tab:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-soft);
}

.editor-tab.is-active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.editor-tab--num,
.editor-tab--add {
  width: 44px;
  padding: 0;
  display: grid;
  place-items: center;
}

.editor-tab--add {
  border-style: dashed;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.editor-tab--add:hover,
.editor-tab--add:focus-visible {
  background: #d7eef9;
  color: var(--blue);
  border-color: var(--blue);
}

.editor-stage {
  padding-top: 24px;
  flex: 1;
}

.editor-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.editor-panel[hidden] {
  display: none !important;
}

.editor-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.editor-panel__head h2 {
  font-size: 26px;
  letter-spacing: -0.04em;
  margin: 0 0 4px;
}

.editor-panel__head p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin: 0 !important;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

.editor-span,
.editor-grid .admin-photo,
.editor-nums {
  grid-column: 1 / -1;
}

.editor-nums {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px 16px;
}

.admin-shell--editor .admin-photo {
  width: min(360px, 100%);
  margin: 4px 0 12px;
}

.admin-shell--editor .admin-photo img {
  height: 180px;
}

.admin-shell--editor .q-cell__points {
  max-width: 160px;
}

.admin-shell--editor .q-cell__add-opt {
  margin-top: 4px;
}

.admin-shell--editor .q-options {
  margin-top: 4px;
}

.admin-tests {
  display: grid;
  gap: 12px;
}

.admin-test {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f9fbfd;
}

.admin-test__media {
  width: 108px;
  height: 80px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--pill);
}

.admin-test__media--empty {
  display: block;
}

.admin-test__tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.admin-test__subject {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-test h3 {
  font-size: 18px;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.admin-test p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.admin-menu {
  position: relative;
  justify-self: end;
}

.admin-menu__btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}

.admin-menu__btn span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--nav);
}

.admin-menu.is-open .admin-menu__btn,
.admin-menu__btn:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.admin-menu.is-open .admin-menu__btn span,
.admin-menu__btn:hover span {
  background: var(--blue);
}

.admin-menu__list {
  position: fixed;
  z-index: 40;
  min-width: 196px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(3, 44, 63, 0.12);
  padding: 6px;
}

.admin-menu__list a,
.admin-menu__list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.admin-menu__list a:hover,
.admin-menu__list button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.admin-menu__list .admin-menu__danger {
  color: #9b2c2c;
}

.admin-menu__list .admin-menu__danger:hover {
  background: #fdeeee;
  color: #9b2c2c;
}

.btn--danger {
  background: #c44747;
  color: #fff;
  box-shadow: 0 8px 20px rgba(196, 71, 71, 0.2);
}

.btn--danger:hover {
  background: #b13b3b;
  box-shadow: 0 12px 28px rgba(196, 71, 71, 0.28);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 20px 0 0;
}

.modal__actions .btn {
  min-height: 44px;
  padding: 0 18px;
}

#delete-test-modal {
  z-index: 80;
}

#delete-test-modal .modal__backdrop {
  backdrop-filter: none;
}

#delete-test-modal .modal__card {
  z-index: 1;
  background: #fff;
}

#delete-test-modal .modal__card p {
  color: var(--muted);
  margin: 8px 0 0;
  font-weight: 600;
}

#delete-test-modal .modal__card strong {
  color: var(--ink);
}

@media (max-width: 900px) {
  .admin-top__inner {
    width: min(1200px, calc(100% - 24px));
    gap: 10px;
  }

  .admin-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex-shrink: 0;
    z-index: 31;
  }

  .admin-shell.is-open .admin-burger {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: 0 4px 16px rgba(1, 114, 182, 0.15);
  }

  .admin-shell.is-open .admin-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .admin-shell.is-open .admin-burger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .admin-shell.is-open .admin-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .admin-top__user {
    display: none;
  }

  .admin-body {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .admin-nav {
    position: fixed;
    top: 76px;
    left: -110%;
    z-index: 25;
    width: min(320px, 86vw);
    height: calc(100vh - 76px);
    height: calc(100dvh - 76px);
    border-radius: 0 24px 24px 0;
    transform: none;
    pointer-events: none;
    transition: left 0.3s ease;
    padding-top: 18px;
    display: flex;
    flex-direction: column;
  }

  .admin-nav__logout {
    display: block;
    margin-top: auto;
    padding: 16px 12px 8px;
    border-top: 1px solid var(--line);
  }

  .admin-nav__logout .admin-logout {
    width: 100%;
  }

  .admin-shell.is-open .admin-nav {
    left: 0;
    pointer-events: auto;
  }

  .admin-nav__backdrop {
    display: block;
    position: fixed;
    top: 76px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 24;
    background: rgba(3, 44, 63, 0.42);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .admin-shell.is-open .admin-nav__backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-main {
    padding: 22px 18px;
  }

  .admin-main h1 {
    font-size: 26px;
  }

  .admin-table-wrap {
    margin: 0;
    padding: 0;
  }

  .admin-table {
    min-width: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    background: #f9fbfd;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 14px 8px;
    margin-bottom: 12px;
  }

  .admin-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    word-break: break-word;
    white-space: normal;
  }

  .admin-table td:last-child {
    border-bottom: 0;
  }

  .admin-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
  }

  .admin-table tbody tr:last-child td {
    border-bottom: 1px solid var(--line);
  }

  .admin-table tbody tr:last-child td:last-child {
    border-bottom: 0;
  }

  .admin-user {
    min-width: 0;
    justify-content: flex-end;
  }

  .admin-head {
    flex-wrap: wrap;
  }

  .form__row--3 {
    grid-template-columns: 1fr;
  }

  .admin-test {
    position: relative;
    grid-template-columns: 1fr;
  }

  .admin-test__media {
    width: 100%;
    height: 140px;
  }

  .admin-test .admin-menu {
    position: absolute;
    top: 18px;
    right: 18px;
  }

  .editor-top__inner,
  .editor-wrap,
  .editor-form > .form-flash {
    width: min(1080px, calc(100% - 24px));
  }

  .editor-top__inner {
    flex-wrap: wrap;
    min-height: 64px;
    gap: 10px;
    padding: 10px 0;
  }

  .editor-top h1 {
    order: 3;
    flex: 1 0 100%;
    font-size: 18px;
  }

  .editor-top__actions {
    margin-left: auto;
  }

  .editor-top__actions .btn {
    min-height: 40px;
    padding: 0 14px;
  }

  .editor-panel {
    padding: 20px 16px;
  }

  .editor-panel__head {
    flex-wrap: wrap;
  }

  .editor-panel__head h2 {
    font-size: 22px;
  }

  .editor-grid {
    grid-template-columns: 1fr;
  }

  .editor-nums {
    grid-template-columns: 1fr;
  }

  .admin-shell--editor .q-cell__points {
    max-width: none;
  }

  .admin-shell--editor .q-opt--row {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 6px;
    padding: 6px;
  }

  .admin-shell--editor .q-opt:not(.q-opt--row) {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .admin-top__badge {
    display: none;
  }

  .editor-tab {
    min-height: 40px;
    font-size: 13px;
  }

  .editor-tab--num,
  .editor-tab--add {
    width: 40px;
  }
}

.auth-spam {
  background: #fff7e8;
  color: #8a5a12;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px !important;
  line-height: 1.45;
}

.code-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 8px 0 18px;
}

.code-boxes input {
  width: 100%;
  height: 56px;
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  padding: 0;
  border-radius: 14px;
}

.auth-resend {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.page-profile {
  padding-top: 0;
  background: #f7fafc;
}

.cabinet {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.cabinet-nav {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.cabinet-nav__logo {
  margin: 0 8px 10px;
}

.cabinet-nav__logo .logo__name {
  display: inline;
  font-size: 14px;
}

.cabinet-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f8fbfd;
}

.cabinet-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}

.cabinet-nav nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cabinet-nav nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--nav);
  font-weight: 700;
  font-size: 14px;
  position: relative;
}

.cabinet-nav__count,
.cabinet-bell__count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e24b4b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.cabinet-nav__count {
  margin-left: auto;
}

.cabinet-nav nav a.is-active,
.cabinet-nav nav a:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.cabinet-nav__logout {
  display: none;
}

.cabinet-nav__logout button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--nav);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.cabinet-nav__logout button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.cabinet-nav__label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 12px 4px;
}

.cabinet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5a5a;
  margin-left: auto;
}

.cabinet-help {
  margin-top: auto;
  position: relative;
  background: var(--blue-soft);
  border-radius: 20px;
  padding: 16px 44px 16px 16px;
  color: var(--ink);
}

.cabinet-help__copy p {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

.cabinet-help__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.cabinet-help__btn:hover {
  color: #fff;
  background: #015f98;
}

.cabinet-help__ico {
  position: absolute;
  top: 16px;
  right: 14px;
  color: var(--blue);
}

.cabinet-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cabinet-top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 16px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.cabinet-brand {
  display: none;
  min-width: 0;
  flex: 1;
}

.cabinet-brand .logo__name {
  display: inline;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cabinet-hello-block {
  min-width: 0;
  flex: 1;
}

.cabinet-hello {
  font-size: 18px;
  font-weight: 800;
}

.cabinet-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.cabinet-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cabinet-lang--nav {
  display: none;
}

.cabinet-lang--top .lang__btn {
  padding: 6px 10px;
  font-size: 12px;
}

.cabinet-user form {
  display: flex;
}

.cabinet-user .cabinet-header-out {
  display: flex;
}

.cabinet-bell,
.cabinet-out {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--nav);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.cabinet-bell:hover,
.cabinet-out:hover,
.cabinet-person:hover {
  color: var(--blue);
  border-color: #b7d7eb;
  background: var(--blue-soft);
}

.cabinet-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  flex-shrink: 0;
  color: inherit;
}

.cabinet-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.cabinet-person strong {
  font-size: 14px;
  font-weight: 800;
  padding-right: 4px;
}

.cabinet-body {
  padding: 24px 28px 40px;
}

.cabinet-welcome {
  margin-bottom: 20px;
}

.cabinet-welcome__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.cabinet-welcome h1 {
  font-size: 32px;
  letter-spacing: -0.04em;
}

.cabinet-welcome p {
  color: var(--muted);
}

.cabinet-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: none;
  border: 0;
}

.cabinet-all:hover {
  color: var(--blue);
  background: #d7ecf8;
  transform: none;
}

.cabinet-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cabinet-stats article {
  position: relative;
  border-radius: 20px;
  padding: 18px 16px 16px;
  min-height: 108px;
}

.cabinet-stats article:nth-child(1) { background: #dceefb; }
.cabinet-stats article:nth-child(2) { background: #d8f3e8; }
.cabinet-stats article:nth-child(3) { background: #f7efb8; }
.cabinet-stats article:nth-child(4) { background: #ece3fb; }

.cabinet-stats__ico {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  object-fit: contain;
  pointer-events: none;
}

.cabinet-stats strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
  padding-right: 44px;
}

.cabinet-stats span {
  color: var(--nav);
  font-size: 13px;
  font-weight: 700;
}

.cabinet-home-grid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 340px);
  gap: 18px;
  margin-top: 20px;
  align-items: start;
}

.cabinet-home-side {
  display: grid;
  gap: 14px;
}

.cabinet-widget {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(3, 44, 63, 0.04);
  padding: 18px 18px 16px;
}

.cabinet-widget h2 {
  font-size: 16px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.cabinet-widget__empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0 4px;
}

.cabinet-results {
  display: grid;
  gap: 10px;
}

.cabinet-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cabinet-result__main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.cabinet-result__main strong {
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-result__main span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.cabinet-result .exam-row__score {
  font-size: 14px;
  padding: 5px 9px;
  flex-shrink: 0;
}

.cabinet-results-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.cabinet-result-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(3, 44, 63, 0.04);
}

.cabinet-result-row__main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.cabinet-result-row__main strong {
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
}

.cabinet-result-row__main span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.cabinet-result-row .exam-row__score {
  font-size: 14px;
  padding: 5px 9px;
  flex-shrink: 0;
}

.cabinet-result-row__open {
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.cabinet-result-row__open:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .cabinet-result-row {
    grid-template-columns: 1fr auto;
  }

  .cabinet-result-row__open {
    grid-column: 1 / -1;
  }
}

.cabinet-widget__more {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.cabinet-widget__more:hover {
  color: var(--blue);
  text-decoration: underline;
}

.rating-page h1 {
  color: var(--ink);
}

.rating-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.rating-page__head h1 {
  margin-bottom: 8px;
}

.rating-page__head .cabinet-section__lead {
  margin: 0;
}

.rating-howto-btn {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(3, 44, 63, 0.04);
}

.rating-howto-btn:hover {
  border-color: #b7d7eb;
  background: var(--blue-soft);
}

.rating-howto-modal__card {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: 28px 26px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.rating-howto-modal__card::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.rating-howto-modal__card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
  padding-right: 28px;
}

.rating-howto-modal__card h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.rating-howto-modal__lead,
.rating-howto-modal__card > p,
.rating-howto-modal__note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.rating-howto-modal__vars {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.rating-howto-modal__vars em {
  font-style: italic;
  color: var(--blue);
  font-weight: 800;
}

.rating-formula {
  display: grid;
  place-items: center;
  margin: 12px 0 4px;
  padding: 16px;
  border-radius: 16px;
  background: #f4f8fb;
  border: 1px solid var(--line);
}

.rating-formula__eq {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.rating-formula__eq em {
  font-style: italic;
  font-weight: 800;
}

.rating-formula__frac {
  display: inline-grid;
  justify-items: center;
  gap: 0;
  line-height: 1.2;
}

.rating-formula__num {
  padding: 0 8px 4px;
  border-bottom: 2px solid var(--ink);
}

.rating-formula__den {
  padding: 4px 8px 0;
}

.rating-howto-examples {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}

.rating-howto-examples article {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7fafc;
  border: 1px solid #e8eef2;
}

.rating-howto-examples strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.rating-howto-examples p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.rating-howto-examples b {
  color: var(--ink);
}

.rating-howto-modal__note {
  margin-top: 8px;
}

@media (max-width: 640px) {
  .rating-page__head {
    flex-direction: column;
    align-items: stretch;
  }

  .rating-howto-btn {
    width: 100%;
    text-align: center;
  }
}

.rating-podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 14px;
  align-items: end;
  margin: 8px 0 22px;
}

.rating-podium__card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(3, 44, 63, 0.05);
  padding: 18px 16px 20px;
  text-align: center;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
}

.rating-podium__card--1 {
  min-height: 248px;
  padding-top: 28px;
  border-color: #e2b84a;
  background: linear-gradient(180deg, #fff8e6 0%, #fff 48%);
  box-shadow: 0 14px 32px rgba(196, 137, 32, 0.18);
}

.rating-podium__card--2 {
  min-height: 200px;
  padding-top: 20px;
  border-color: #a8b4bf;
  background: linear-gradient(180deg, #f3f6f8 0%, #fff 48%);
  box-shadow: 0 10px 26px rgba(127, 140, 152, 0.16);
}

.rating-podium__card--3 {
  min-height: 168px;
  padding-top: 16px;
  border-color: #d0894f;
  background: linear-gradient(180deg, #fff1e6 0%, #fff 48%);
  box-shadow: 0 10px 26px rgba(196, 122, 69, 0.16);
}

.rating-podium__card strong {
  font-size: 15px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.rating-podium__card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.rating-podium__card em {
  font-style: normal;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 4px;
}

.rating-podium__card--1 em {
  color: #c48920;
}

.rating-podium__card--2 em {
  color: #6b7884;
}

.rating-podium__card--3 em {
  color: #c47a45;
}

.rating-podium__medal {
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.rating-podium__empty {
  color: var(--muted);
  font-size: 24px;
  font-weight: 700;
  margin: auto;
}

.rating-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(3, 44, 63, 0.04);
  overflow: hidden;
}

.rating-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rating-table th,
.rating-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

.rating-table th {
  background: #f4f7fa;
  color: #8a97a1;
  font-weight: 700;
  font-size: 13px;
}

.rating-table td {
  border-top: 1px solid #eef2f5;
  color: var(--ink);
  font-weight: 600;
}

.rating-table th:first-child,
.rating-table td:first-child {
  width: 56px;
  text-align: center;
  color: var(--muted);
}

.rating-table th:nth-child(5),
.rating-table td:nth-child(5),
.rating-table th:nth-child(6),
.rating-table td:nth-child(6) {
  width: 88px;
  text-align: center;
}

.rating-table tbody tr.is-me {
  background: #e8f4fc;
}

.rating-table tbody tr.is-place-1 {
  background: #fff8e6;
}

.rating-table tbody tr.is-place-1 td:first-child {
  color: #c48920;
  font-weight: 800;
}

.rating-table tbody tr.is-place-1 td:last-child {
  color: #c48920;
  font-weight: 800;
}

.rating-table tbody tr.is-place-2 {
  background: #e8eef3;
}

.rating-table tbody tr.is-place-2 td:first-child {
  color: #4d5b66;
  font-weight: 800;
}

.rating-table tbody tr.is-place-2 td:last-child {
  color: #4d5b66;
  font-weight: 800;
}

.rating-table tbody tr.is-place-3 {
  background: #fff1e6;
}

.rating-table tbody tr.is-place-3 td:first-child {
  color: #c47a45;
  font-weight: 800;
}

.rating-table tbody tr.is-place-3 td:last-child {
  color: #c47a45;
  font-weight: 800;
}

.rating-table tbody tr.is-place-1.is-me,
.rating-table tbody tr.is-place-2.is-me,
.rating-table tbody tr.is-place-3.is-me {
  box-shadow: inset 3px 0 0 var(--blue);
}

.rating-table__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rating-table__you {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.rating-table--me {
  border-top: 1px solid #eef2f5;
}

.rating-table--me td {
  border-top: 0;
}

.rating-table__hint {
  margin: 0;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border-top: 1px solid #eef2f5;
}

@media (max-width: 900px) {
  .rating-podium {
    grid-template-columns: 1fr 1.15fr 1fr;
    align-items: end;
    gap: 8px;
  }

  .rating-podium__card {
    padding: 12px 8px 14px;
    border-radius: 16px;
    gap: 4px;
  }

  .rating-podium__card--1 {
    min-height: 188px;
    padding-top: 18px;
  }

  .rating-podium__card--2 {
    min-height: 156px;
    padding-top: 14px;
  }

  .rating-podium__card--3 {
    min-height: 132px;
    padding-top: 12px;
  }

  .rating-podium__medal svg {
    width: 28px;
    height: auto;
  }

  .rating-podium__card--1 .rating-podium__medal svg {
    width: 32px;
  }

  .rating-podium__card strong {
    font-size: 12px;
  }

  .rating-podium__card span {
    font-size: 11px;
  }

  .rating-podium__card em {
    font-size: 18px;
  }

  .rating-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .rating-table-wrap::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .rating-table {
    min-width: 640px;
  }
}

.cabinet-weekly {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cabinet-weekly__media {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}

.cabinet-weekly__media--empty {
  background: var(--pill);
}

.cabinet-weekly__body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.cabinet-weekly__tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cabinet-weekly__body strong {
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink);
}

.cabinet-weekly__meta,
.cabinet-weekly__when {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.cabinet-weekly__when {
  color: var(--blue);
  font-weight: 800;
}

.weekly-modal__card {
  width: min(580px, 100%);
  padding: 28px 26px 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(1, 114, 182, 0.12), transparent 42%),
    #fff;
}

.weekly-modal__head {
  margin-bottom: 18px;
  padding-right: 28px;
}

.weekly-modal__badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.weekly-modal__card h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.weekly-modal__lead {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.45;
}

.weekly-form {
  display: grid;
  gap: 16px;
}

.weekly-step__label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.weekly-tracks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 640px) {
  .weekly-tracks {
    grid-template-columns: 1fr 1fr;
  }
}

.weekly-track {
  cursor: pointer;
}

.weekly-track input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.weekly-track span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.weekly-track input:checked + span {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.weekly-search-wrap {
  margin-bottom: 8px;
}

.weekly-search {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  background: #f7fbfe;
}

.weekly-search:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
}

.weekly-tests {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.weekly-tests__empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 0;
}

.weekly-test {
  display: grid;
  gap: 2px;
  text-align: left;
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
}

.weekly-test strong {
  font-size: 14px;
  color: var(--ink);
}

.weekly-test span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.weekly-test:hover {
  border-color: #b7d7eb;
  background: #f8fbfe;
}

.weekly-test.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 1px var(--blue);
}

.weekly-picked {
  margin-top: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.weekly-when {
  display: grid;
  gap: 12px;
}

.weekly-when__row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
}

.weekly-when .field {
  display: grid;
  gap: 6px;
  margin: 0;
}

.weekly-when .field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.weekly-when input,
.weekly-when select {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  font: inherit;
  font-weight: 600;
  background: #f7fbfe;
  color: inherit;
}

.weekly-when input:focus,
.weekly-when select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(1, 114, 182, 0.12);
}

.weekly-when__day input {
  text-align: center;
  padding: 0 8px;
  -moz-appearance: textfield;
}

.weekly-when__day input::-webkit-outer-spin-button,
.weekly-when__day input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.weekly-when__hint {
  margin: 0;
  color: #c0392b;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .weekly-when__row {
    grid-template-columns: 88px 1fr;
  }
}

.weekly-modal__actions {
  margin-top: 4px;
}

.admin-test--weekly {
  grid-template-columns: 1fr auto;
  border: 1.5px solid #9fd0ef;
  background: linear-gradient(180deg, #eef7fc 0%, #fff 70%);
  box-shadow: 0 10px 28px rgba(1, 114, 182, 0.08);
}

.admin-chip--weekly {
  background: var(--blue);
  color: #fff;
}

.admin-weekly-remove {
  flex-shrink: 0;
}

.admin-weekly-remove .btn {
  min-height: 40px;
  padding: 0 14px;
}

.cabinet-alert--weekly {
  border-color: #9fd0ef;
  background: linear-gradient(180deg, #f3f9fd 0%, #fff 55%);
}

.cabinet-alert--weekly.is-unread {
  box-shadow: inset 3px 0 0 var(--blue);
}

.cabinet-weekly {
  display: block;
}

.cabinet-weekly__media {
  display: none;
}

.cabinet-panel {
  min-height: 280px;
}

.cabinet-account__hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
}

.cabinet-account__avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.cabinet-account__hero h1 {
  font-size: 28px;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}

.cabinet-account__hero p {
  color: var(--muted);
  font-weight: 600;
}

.cabinet-account__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cabinet-account__grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 18px;
}

.cabinet-account__grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.cabinet-account__grid strong {
  font-size: 16px;
  font-weight: 800;
  word-break: break-word;
}

.cabinet-burger {
  display: none;
  margin-left: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.cabinet-burger span {
  margin: 0;
}

.cabinet-backdrop {
  display: none;
}

.cabinet-home-grid__main {
  min-width: 0;
}

.cabinet-continue {
  padding: 0;
}

.cabinet-continue h2 {
  font-size: 18px;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--ink);
}

.my-courses-grid--home {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .cabinet-stats {
    grid-template-columns: 1fr 1fr;
  }

  .cabinet-home-grid {
    grid-template-columns: 1fr;
  }

  .cabinet-account__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .cabinet {
    grid-template-columns: 1fr;
  }

  .cabinet-burger {
    display: flex;
    margin-left: 0;
  }

  .cabinet-brand {
    display: inline-flex;
  }

  .cabinet-hello-block,
  .cabinet-user .cabinet-header-out {
    display: none;
  }

  .cabinet-lang--top {
    display: none;
  }

  .cabinet-lang--nav {
    display: flex;
    width: 100%;
    justify-content: center;
    margin: 0 0 4px;
  }

  .cabinet-lang--nav .lang__btn {
    flex: 1;
    text-align: center;
  }

  .cabinet-nav__logout {
    display: block;
  }

  .cabinet-person {
    padding: 4px;
  }

  .cabinet-person strong {
    display: none;
  }

  .cabinet-nav {
    position: fixed;
    top: 0;
    left: -110%;
    z-index: 30;
    width: min(300px, 86vw);
    height: 100dvh;
    transition: left 0.3s ease;
    border-right: 0;
  }

  .cabinet.is-open .cabinet-nav {
    left: 0;
  }

  .cabinet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(3, 44, 63, 0.42);
    opacity: 0;
    pointer-events: none;
  }

  .cabinet.is-open .cabinet-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .cabinet-welcome h1 {
    font-size: 26px;
  }

  .cabinet-top,
  .cabinet-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 720px) {
  .code-boxes {
    gap: 6px;
  }

  .code-boxes input {
    height: 48px;
    font-size: 18px;
  }

  .cabinet-welcome__row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .cabinet-account__hero {
    align-items: flex-start;
  }

  .cabinet-account__hero h1 {
    font-size: 22px;
  }
}

.pay-card {
  width: min(440px, 100%);
}

.pay-card__lead {
  margin: 8px 0 0;
}

.pay-card__price {
  margin: 12px 0 20px;
  font-size: 28px;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.pay-methods {
  display: grid;
  gap: 10px;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
  position: relative;
}

.pay-method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-method img,
.pay-method__cash {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.pay-method__cash {
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

.pay-method span {
  display: grid;
  gap: 2px;
}

.pay-method strong {
  font-size: 15px;
}

.pay-method small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.pay-method:hover:not(.is-disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.pay-method.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 1px var(--blue);
}

.pay-method.is-disabled {
  cursor: not-allowed;
  background: #f6f7f8;
}

.pay-method.is-disabled span {
  opacity: 0.62;
}

.pay-card__submit {
  margin-top: 14px;
}

.pay-card__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.receipt-card__ok {
  margin: 8px 0 16px;
  color: var(--blue);
  font-weight: 700;
}

.receipt-list {
  display: grid;
  gap: 12px;
  margin: 0 0 8px;
}

.receipt-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.receipt-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.receipt-list > .receipt-list__purchase {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: stretch;
  gap: 10px;
}

.receipt-list > .receipt-list__purchase dt {
  width: 100%;
}

.receipt-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.receipt-list dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
  color: var(--ink);
}

.receipt-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  justify-content: flex-start;
}

.receipt-list__item img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.receipt-list__item span {
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
}

.receipt-card__actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.receipt-card__actions .btn {
  min-width: 180px;
  min-height: 48px;
  padding: 0 28px;
  font-size: 15px;
}

.admin-order-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
  padding: 4px 8px;
}

.admin-table__sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.admin-pay-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-pay-item img,
.admin-pay-item__empty {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--pill);
  flex-shrink: 0;
}

.admin-pay-item strong {
  white-space: normal;
}

.cabinet-section h1 {
  font-size: 32px;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

.cabinet-empty {
  display: grid;
  place-items: center;
  min-height: 200px;
  border: 1px dashed #d5e0e6;
  border-radius: 22px;
  color: var(--muted);
  font-weight: 600;
  background: #f9fbfd;
}

.cab-tariff-active {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 24px 20px;
  margin-bottom: 22px;
}

.cab-tariff-active__label {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cab-tariff-active h2 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.cab-tariff-active__until {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 600;
}

.cab-tariff-active__subjects {
  margin-bottom: 12px;
}

.cab-tariff-active__meta {
  margin: 0;
  font-weight: 700;
}

.tariffs--cabinet {
  padding: 0;
  margin: 0;
}

.tariffs--cabinet .tariffs__card {
  box-shadow: none;
}

.tariffs--cabinet .tariffs__head h2 {
  font-size: 28px;
}

.cabinet-alerts {
  display: grid;
  gap: 10px;
}

.cabinet-alert {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
}

.cabinet-alert.is-unread {
  background: var(--blue-soft);
  border-color: #c5def0;
}

.cabinet-alert__top,
.cabinet-alert__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cabinet-alert__top {
  align-items: flex-start;
  margin-bottom: 12px;
}

.cabinet-alert__top h2 {
  font-size: 16px;
  letter-spacing: -0.02em;
  margin: 0;
}

.cabinet-alert__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cabinet-alert__actions form {
  margin: 0;
}

.cabinet-alert .hp {
  display: none;
}

.cabinet-alert__btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--nav);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}

.cabinet-alert__btn:hover {
  border-color: var(--blue);
  background: #fff;
  color: var(--blue);
}

.cabinet-alert__btn--danger:hover {
  border-color: #e24b4b;
  color: #e24b4b;
  background: #fdeeee;
}

.cabinet-alert__btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  z-index: 4;
  background: #123;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 8px;
  padding: 5px 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cabinet-alert__btn:hover::after {
  opacity: 1;
  transform: none;
}

.cabinet-alert__test {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cabinet-alert__test img,
.cabinet-alert__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--pill);
  flex-shrink: 0;
}

.cabinet-alert__test strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-alert__grade {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  color: #1f7a57;
  background: #e7f6f0;
  border-radius: 999px;
  padding: 4px 8px;
}

.cabinet-alert__meta time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.cabinet-bell__count {
  position: absolute;
  top: -6px;
  right: -6px;
  box-shadow: 0 0 0 2px #fff;
}

.cabinet-bell__dot {
  display: none;
}

@media (max-width: 720px) {
  .cabinet-alert__meta {
    flex-wrap: wrap;
  }

  .cabinet-alert__meta time {
    width: 100%;
    text-align: right;
  }
}

.take {
  padding: 0;
  background: transparent;
  min-height: 0;
}

.take--cabinet {
  width: 100%;
  display: flex;
  justify-content: center;
}

.take__wrap {
  width: min(820px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.take-top,
.take-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.take-card {
  padding: 26px 28px;
}

.take-top__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.take-top__attempt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.take-top h1 {
  font-size: 26px;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1.2;
}

.take-timer {
  flex-shrink: 0;
  background: var(--pill);
  border-radius: 999px;
  padding: 9px 15px;
  display: grid;
  gap: 2px;
  text-align: center;
  min-width: 128px;
}

.take-timer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.take-timer strong {
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.take-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 700;
}

.take-progress__meta span:first-child {
  color: var(--muted);
}

.take-progress__meta span:last-child {
  color: var(--ink);
}

.take-progress__bar {
  height: 7px;
  border-radius: 999px;
  background: #e8eef2;
  overflow: hidden;
}

.take-progress__bar i {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.take-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.take-card__head h2 {
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.3;
}

.take-card__prompt p {
  margin: 0 0 0.4em;
}

.take-card__prompt p:last-child {
  margin-bottom: 0;
}

.take-card__prompt img {
  max-width: 100%;
  height: auto;
}

.take-option__body {
  min-width: 0;
  flex: 1;
  font-weight: 700;
  text-align: left;
}

.take-option__body p {
  margin: 0 0 0.35em;
}

.take-option__body p:last-child {
  margin-bottom: 0;
}

.take-option__body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.take-option__body .katex,
.take-card__prompt .katex {
  font-size: 1.05em;
}

.take-card__points {
  flex-shrink: 0;
  background: var(--pill);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.take-card__hint {
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.take-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.take-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.take-option:hover {
  border-color: #b7d7eb;
  background: #f8fbfe;
}

.take-option.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 1px var(--blue);
}

.take-option__mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.8px solid #c5d3da;
  flex-shrink: 0;
  position: relative;
  background: #fff;
}

.take-option.is-selected .take-option__mark {
  border-color: var(--blue);
}

.take-option.is-selected .take-option__mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--blue);
}

.take-nav {
  display: flex;
  justify-content: center;
}

.take-nav__row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.take-nav__back {
  min-height: 46px;
  padding: 0 16px;
  flex-shrink: 0;
  font-size: 14px;
}

.take-nav__next {
  min-height: 46px;
  min-width: 180px;
  padding: 0 20px;
  flex-shrink: 0;
  border-radius: 14px;
  font-size: 14px;
}

.take-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  flex: 0 1 auto;
}

.take-pager__btn,
.take-pager__dots {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid #d7e0e6;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.take-pager__dots {
  border: 0;
  background: transparent;
  cursor: default;
  color: #9aa8b2;
}

.take-pager__btn.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.take-pager__btn.is-done:not(.is-active) {
  background: #eaf4fb;
  border-color: #b7d7eb;
  color: var(--blue);
}

.take-result-card {
  text-align: center;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(1, 114, 182, 0.12), transparent 55%),
    #fff;
}

.take-result-card h2 {
  margin: 0;
  color: var(--ink);
}

.take-result__percent {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 16px 0 8px;
  transition: color 0.25s ease;
}

.take-result__score {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--ink);
  opacity: 0.72;
}

.take-result-card--bad {
  background:
    radial-gradient(circle at 50% 0%, rgba(220, 68, 68, 0.16), transparent 55%),
    #fff;
}
.take-result-card--ok {
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 145, 32, 0.16), transparent 55%),
    #fff;
}
.take-result-card--good {
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 170, 96, 0.16), transparent 55%),
    #fff;
}
.take-result-card--excellent {
  background:
    radial-gradient(circle at 50% 0%, rgba(1, 114, 182, 0.18), transparent 55%),
    #fff;
}

.exam-row__score--bad {
  color: #c62828;
  background: #fde8e8;
}
.exam-row__score--ok {
  color: #c77700;
  background: #fff1db;
}
.exam-row__score--good {
  color: #1b8a4a;
  background: #e5f7ec;
}
.exam-row__score--excellent {
  color: #0172b6;
  background: #e7f3fb;
}

.take-result__percent.is-bad { color: #e53935; }
.take-result__percent.is-ok { color: #f09820; }
.take-result__percent.is-good { color: #22aa60; }
.take-result__percent.is-excellent { color: #0172b6; }

.exam-row__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.exam-row__score {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 12px;
}

.exam-row__cta.is-disabled,
.btn.is-disabled,
.btn:disabled {
  background: #d9e2e8;
  color: #7d8b94;
  border-color: transparent;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.db-admin {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: start;
}

.db-admin__tables {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 6px;
}

.db-admin__table {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}

.db-admin__table span {
  color: var(--muted);
  font-weight: 700;
}

.db-admin__table:hover,
.db-admin__table.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.db-admin__panel {
  min-width: 0;
}

.db-admin__meta {
  margin-bottom: 14px;
}

.db-admin__meta h2 {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.db-admin__meta p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.db-admin__cell {
  display: inline-block;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.db-admin__grid td form {
  margin: 0;
}

@media (max-width: 960px) {
  .db-admin {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .take-top,
  .take-card {
    padding: 18px;
    border-radius: 20px;
  }

  .take-top__row {
    flex-direction: column;
  }

  .take-top h1 {
    font-size: 22px;
  }

  .take-timer {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    padding: 10px 14px;
  }

  .take-timer span,
  .take-timer strong {
    font-size: 14px;
  }

  .take-timer strong {
    font-size: 18px;
  }

  .take-options {
    grid-template-columns: 1fr;
  }

  .take-nav__row {
    flex-direction: column;
    align-items: stretch;
  }

  .take-pager {
    order: 1;
    width: 100%;
  }

  .take-nav__next {
    order: 2;
    width: 100%;
  }

  .take-nav__back {
    order: 3;
    width: 100%;
  }
}

.cabinet-section__lead {
  margin: -6px 0 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  max-width: 520px;
}

.my-courses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 920px;
}

.my-course-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 18px rgba(3, 44, 63, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.my-course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(3, 44, 63, 0.08);
}

.my-course-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--pill);
}

.my-course-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.my-course-card__play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(3, 44, 63, 0.14);
}

.my-course-card__play svg {
  width: 14px;
  height: 14px;
}

.my-course-card__body {
  padding: 12px 14px 14px;
}

.my-course-card__body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.my-course-card__body > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.my-course-progress {
  margin-top: 16px;
}

.my-course-progress--card {
  margin-top: 14px;
}

.my-course-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #8a97a1;
  font-size: 13px;
  font-weight: 600;
}

.my-course-progress--card .my-course-progress__meta {
  font-size: 12px;
  margin-bottom: 7px;
}

.my-course-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: #e8eef2;
  overflow: hidden;
}

.my-course-progress__bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
  min-width: 0;
  transition: width 0.25s ease;
}

.my-course__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.my-course__back:hover {
  color: var(--blue);
}

.my-course-hero {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(3, 44, 63, 0.04);
  margin-bottom: 28px;
}

.my-course-hero__media {
  width: 160px;
  height: 160px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--pill);
}

.my-course-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.my-course-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eef2f5;
  color: #5b6b76;
  font-size: 12px;
  font-weight: 700;
}

.my-course-tag--track {
  background: var(--blue-soft);
  color: var(--blue);
}

.my-course-tag--pass {
  background: #e7f6f0;
  color: #1f7a57;
}

.my-course-hero__body h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.my-course-hero__text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  max-width: 640px;
}

.my-course-contents h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.my-course-contents__lead {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  max-width: 560px;
}

.my-course-sections {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.my-course-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(3, 44, 63, 0.04);
}

.my-course-section__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.my-course-section__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef2f5;
  color: #5b6b76;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}

.my-course-section__head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.my-course-section.is-locked {
  background: #fbfcfd;
}

.my-course-section.is-locked .my-course-section__num {
  background: #eef2f5;
  color: #8a97a1;
}

.my-course-section.is-locked .my-course-section__head h3,
.my-course-section.is-locked .my-course-section__count {
  color: #9aa6af;
}

.my-course-section__count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.my-course-section__empty {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 14px;
}

.my-course-lessons {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.my-lesson {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
}

.my-lesson + .my-lesson {
  border-top: 1px solid #eef2f5;
}

.my-lesson__ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.my-lesson__ico--done {
  background: #e7f6f0;
  color: #1f7a57;
}

.my-lesson__ico--lock {
  background: #eef2f5;
  color: #9aa6af;
}

.my-lesson.is-locked .my-lesson__body strong,
.my-lesson.is-locked .my-lesson__meta {
  color: #9aa6af;
}

.my-lesson__body strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.my-lesson__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.my-lesson__side {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: right;
}

.my-lesson__lock-msg {
  justify-self: end;
  color: #9aa6af;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  max-width: 220px;
  line-height: 1.3;
}

.my-lesson__score {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.my-lesson__score.is-pass {
  color: #1f7a57;
}

.my-lesson__score.is-fail {
  color: #b42318;
}

.my-lesson__open {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--blue);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.my-lesson__open:hover {
  text-decoration: underline;
}

.my-course-tag--test {
  background: #fff3cd;
  color: #8a6d1d;
}

.cabinet-section--lesson {
  max-width: none;
}

.learn__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.learn__meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.learn__title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--ink);
}

.learn__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.learn__main,
.learn__side {
  display: grid;
  gap: 16px;
}

.learn-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(3, 44, 63, 0.04);
}

.learn-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #0b1c26;
}

.learn-video__frame iframe,
.learn-video__frame video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  background: #000;
}

.learn-video__empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.learn-video__materials {
  margin-top: 14px;
}

.learn-video__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.learn-tabs__nav {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin: -4px 0 16px;
}

.learn-tabs__btn {
  border: 0;
  background: transparent;
  padding: 10px 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.learn-tabs__btn.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.learn-tabs__panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.learn-rich {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.learn-rich p {
  margin: 0 0 10px;
}

.learn-rich ol,
.learn-rich ul {
  margin: 0 0 12px;
  padding-left: 1.4em;
}

.learn-rich li {
  margin: 0 0 8px;
}

.learn-rich [style*="mso-list:Ignore"] {
  display: none !important;
}

.learn-rich img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.learn-rich .katex,
.learn-rich .delfin-math,
.take-card__prompt .katex,
.take-option__body .katex {
  font-size: 1.08em;
}

.delfin-math {
  display: inline-block;
  vertical-align: middle;
  padding: 0 2px;
}

.learn-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.learn-outline h2,
.learn-quiz h2 {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.learn-outline__lead,
.learn-quiz__lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.learn-outline__section + .learn-outline__section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f5;
}

.learn-outline__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.learn-outline__head strong {
  font-size: 14px;
}

.learn-outline__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.learn-outline__list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.learn-outline__list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
}

.learn-outline__list li.is-current {
  background: var(--blue-soft);
}

.learn-outline__list li.is-locked {
  opacity: 0.72;
}

.learn-outline__ico {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
}

.learn-outline__ico--ok {
  background: #e7f6f0;
  color: #1f7a57;
}

.learn-outline__ico--lock {
  background: #eef2f5;
  color: #9aa6af;
}

.learn-outline__title {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

a.learn-outline__title:hover {
  color: var(--blue);
}

.learn-outline__status {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.learn-quiz__stats {
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
}

.learn-quiz__stats > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.learn-quiz__stats dt {
  color: var(--muted);
  font-weight: 500;
}

.learn-quiz__stats dd {
  margin: 0;
  font-weight: 700;
}

.learn-quiz__best {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}

.learn-quiz__best.is-pass {
  background: #e7f6f0;
  color: #1f7a57;
}

.learn-quiz__best.is-fail {
  background: #fff1f0;
  color: #b42318;
}

.learn-quiz__split {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.learn-hw__teacher {
  margin: 0 0 14px;
  font-size: 14px;
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
}

.learn-hw__teacher a {
  color: var(--blue);
  font-weight: 700;
  word-break: break-word;
}

.learn-hw__status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.learn-hw__status.is-pending {
  background: #fff7e8;
  color: #9a6700;
}

.learn-hw__status.is-graded {
  background: #e7f6f0;
  color: #1f7a57;
}

.learn-hw__form {
  display: grid;
  gap: 10px;
  max-width: 420px;
  width: 100%;
}

.learn-hw__hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.learn-hw__download {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.35;
}

.admin-hw-grade {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.admin-hw-grade input {
  width: 88px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.learn__next {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.learn-next {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  min-width: 220px;
}

.learn-next span {
  font-size: 14px;
  font-weight: 800;
}

.learn-next small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.learn-next:hover {
  filter: brightness(1.08);
}

@media (max-width: 980px) {
  .learn__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .learn__title {
    font-size: 22px;
  }

  .learn-card {
    padding: 14px;
    border-radius: 18px;
  }

  .learn-tabs__nav {
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .learn-tabs__nav::-webkit-scrollbar {
    display: none;
  }

  .learn-tabs__btn {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 13px;
  }

  .learn-hw__form {
    max-width: none;
  }

  .learn-hw__form .btn,
  .learn-hw__download,
  .learn-tabs__panel[data-learn-panel="homework"] .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }

  .learn-hw__teacher {
    font-size: 13px;
  }

  .lesson-field input[type="file"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 13px;
  }

  .learn-next {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .my-courses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .my-course-hero {
    grid-template-columns: 1fr;
  }

  .my-course-hero__media {
    width: 100%;
    height: 180px;
  }
}

@media (max-width: 640px) {
  .my-courses-grid {
    grid-template-columns: 1fr;
  }

  .my-courses-grid--home {
    grid-template-columns: 1fr;
  }

  .my-lesson {
    grid-template-columns: auto 1fr;
  }

  .my-lesson__side,
  .my-lesson__lock-msg {
    grid-column: 2;
    justify-self: start;
    text-align: left;
    max-width: none;
  }
}


.books__order-ok {
  margin: 0 0 18px;
}

.book-order-card {
  width: min(520px, 100%);
}

.book-order-form {
  margin-top: 8px;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.book-order-form__section {
  margin: 4px 0 0;
  font-weight: 700;
  color: inherit;
}

.book-order-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .book-order-form__row {
    grid-template-columns: 1fr;
  }
}


/* Kaspi cashier + QR wait */
.kaspi-cashier {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f9fbfd;
  max-width: 100%;
}

.kaspi-cashier .admin-lead {
  margin: 12px 0 0;
  font-size: 13px;
}
.kaspi-cashier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.kaspi-cashier-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.kaspi-cashier-status {
  font-size: 13px;
  font-weight: 700;
  color: #718096;
}
.kaspi-cashier-status.is-ok { color: #276749; }
.kaspi-cashier-status.is-bad { color: #c53030; }
.kaspi-cashier-meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: #4a5568;
  min-height: 1.2em;
}
.kaspi-cashier-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.kaspi-cashier-form .form-input {
  width: auto;
  min-width: 180px;
  flex: 1;
  max-width: 260px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.kaspi-otp-input { max-width: 140px; }
.kaspi-cashier-msg {
  margin: 10px 0 0;
  font-size: 13px;
  color: #c53030;
}
.kaspi-cashier-msg.is-ok { color: #276749; }
.kaspi-pay-wait {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}
.kaspi-pay-wait__lead {
  margin: 0;
  color: #4a5568;
  font-size: 14px;
}
.kaspi-pay-wait__qr {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: #f7fafc;
}
.kaspi-pay-wait__status {
  margin: 0;
  font-weight: 600;
}
.pay-card__hint {
  margin: 8px 0 0;
  color: #c53030;
  font-size: 13px;
}

/* Payments admin: wide table stays inside panel via horizontal scroll */
.admin-table-wrap--payments {
  margin: 0;
  padding: 8px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table--payments {
  min-width: 1120px;
  width: 100%;
}

.admin-table--payments td:nth-child(4),
.admin-table--payments td:nth-child(5) {
  white-space: normal;
  max-width: 220px;
}

.admin-table-wrap--payments .admin-menu.is-open,
.admin-table-wrap--payments .admin-menu__list {
  z-index: 12;
}

@media (max-width: 900px) {
  .admin-table--payments {
    min-width: 0;
  }

  .admin-table-wrap--payments {
    border: 0;
    padding: 0;
    background: transparent;
    overflow: visible;
  }

  .admin-table--payments td:nth-child(4),
  .admin-table--payments td:nth-child(5) {
    max-width: none;
  }
}
