/**
 * Стили компонентов — header, footer, hero, task-circle, canvas
 * Neuronis
 */

@import url('./video_panel.css');
@import url('../task_8/css/action_pill_toggle.css');

/* Header — premium bar (главная, задания, тренажёры); ниже и полупрозрачнее под фон/анимации */
.header {
  --header-scale: 0.8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.5rem * var(--header-scale)) 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(175deg, rgba(28, 33, 38, 0.58) 0%, rgba(18, 22, 27, 0.5) 100%);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border-bottom: 1px solid var(--header-premium-border);
  box-shadow: var(--header-premium-shadow), inset 0 1px 0 var(--header-premium-inset);
  transition: box-shadow 0.25s ease, border-color 0.2s ease, background 0.25s ease;
}

[data-theme="light"] .header {
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.68) 0%, rgba(245, 250, 247, 0.58) 100%);
}

/* Шапка страниц заданий — та же плашка, на всю ширину контейнера */
.header.header--task {
  z-index: 12;
  padding-top: calc(0.45rem * var(--header-scale));
  padding-bottom: calc(0.45rem * var(--header-scale));
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  box-sizing: border-box;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.header__logo:hover {
  transform: translateY(-1px);
}

.header__logo-img {
  display: block;
  width: clamp(
    calc(16rem * var(--header-scale)),
    calc(28vw * var(--header-scale)),
    calc(22rem * var(--header-scale))
  );
  height: auto;
  filter: drop-shadow(0 2px 14px rgba(5, 184, 125, 0.2));
  transition: filter 0.25s ease;
}

.header__logo:hover .header__logo-img {
  filter: drop-shadow(0 4px 22px rgba(5, 184, 125, 0.32))
    drop-shadow(0 0 12px rgba(59, 130, 246, 0.12));
}

[data-theme="light"] .header__logo-img {
  filter: drop-shadow(0 2px 12px rgba(5, 184, 125, 0.12));
}

[data-theme="light"] .header__logo:hover .header__logo-img {
  filter: drop-shadow(0 4px 18px rgba(5, 184, 125, 0.2));
}

.header__logo-img--dark {
  display: none;
}

[data-theme="dark"] .header__logo-img--light {
  display: none;
}

[data-theme="dark"] .header__logo-img--dark {
  display: block;
}

/* Текст логотипа — тот же шрифт, что у .hero__title (Playfair Display) */
.header__logo .header__logo-svg-text {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.header__logo-svg-text--light {
  fill: #0f172a;
}

.header__logo-svg-text--dark {
  fill: #f1f5f9;
}

.header__logo .header__logo-svg-tagline {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
}

.header__logo-svg-tagline--light {
  fill: #64748b;
}

.header__logo-svg-tagline--dark {
  fill: #94a3b8;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  min-width: 0;
}

.header__site-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  margin-right: 0.5rem;
}

/* ЕГЭ / ОГЭ — сегментированный переключатель */
.header__exam-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 16, 22, 0.55);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header__exam-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.35rem;
  padding: 0.42rem 0.95rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  border-radius: 9999px;
  border: 1px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.header__exam-toggle-btn:hover {
  color: var(--white);
}

.header__exam-toggle-btn--active {
  color: #fff;
  pointer-events: none;
  position: relative;
  z-index: 1;
  min-width: 3.55rem;
  padding: 0.5rem 1.05rem;
  font-size: 0.875rem;
  transform: scale(1.06);
}

.header__exam-toggle--premium .header__exam-toggle-btn--active {
  min-width: 3.7rem;
  padding: 0.54rem 1.12rem;
  font-size: 0.875rem;
  transform: scale(1.08);
}

.header__exam-toggle-btn--ege:not(.header__exam-toggle-btn--active) {
  border-color: rgba(5, 184, 125, 0.48);
  color: rgba(167, 243, 208, 0.82);
}

.header__exam-toggle-btn--oge:not(.header__exam-toggle-btn--active) {
  border-color: rgba(20, 184, 166, 0.48);
  color: rgba(153, 246, 228, 0.82);
}

.header__exam-toggle--premium .header__exam-toggle-btn--ege:not(.header__exam-toggle-btn--active) {
  border-color: rgba(5, 184, 125, 0.55);
  box-shadow:
    0 0 0 1px rgba(5, 184, 125, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header__exam-toggle--premium .header__exam-toggle-btn--oge:not(.header__exam-toggle-btn--active) {
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow:
    0 0 0 1px rgba(20, 184, 166, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header__exam-toggle--premium .header__exam-toggle-btn--ege.header__exam-toggle-btn--active {
  border-color: rgba(110, 231, 183, 0.92);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.58) 0%,
    rgba(16, 185, 129, 0.38) 52%,
    rgba(5, 184, 125, 0.2) 100%
  );
  box-shadow:
    0 4px 20px rgba(5, 184, 125, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.header__exam-toggle--premium .header__exam-toggle-btn--oge.header__exam-toggle-btn--active {
  border-color: rgba(94, 234, 212, 0.92);
  background: linear-gradient(
    165deg,
    rgba(13, 148, 136, 0.6) 0%,
    rgba(20, 184, 166, 0.4) 52%,
    rgba(45, 212, 191, 0.22) 100%
  );
  box-shadow:
    0 4px 20px rgba(20, 184, 166, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.header__exam-toggle--premium .header__exam-toggle-btn--ege:not(.header__exam-toggle-btn--active):hover {
  color: #ecfdf5;
  border-color: rgba(5, 184, 125, 0.35);
  background: rgba(5, 184, 125, 0.1);
}

.header__exam-toggle--premium .header__exam-toggle-btn--oge:not(.header__exam-toggle-btn--active):hover {
  color: #f0fdfa;
  border-color: rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.1);
}

.header--home .header__exam-toggle {
  margin-left: 0;
  margin-right: 0;
}

/* Центр шапки: Варианты/Тренажеры; ЕГЭ/ОГЭ — у логотипа */
.header--home:has(.header__site-nav) {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 0.75rem;
}

.header--home:has(.header__site-nav) .header__brand {
  justify-self: start;
}

.header--home:has(.header__site-nav) .header__site-nav {
  justify-self: center;
  margin: 0;
  z-index: 2;
}

.header--home:has(.header__site-nav) .header__right {
  justify-self: end;
  min-width: 0;
}

.header--task .header__exam-toggle {
  flex-shrink: 0;
}

.header--task .header__exam-toggle-btn {
  min-width: 3rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.75rem;
}

.header--task .header__exam-toggle-btn--active {
  min-width: 3.2rem;
  padding: 0.5rem 0.98rem;
  font-size: 0.8125rem;
  transform: scale(1.06);
}

[data-theme="light"] .header__exam-toggle {
  border-color: rgba(5, 184, 125, 0.14);
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 4px 14px rgba(26, 36, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .header__exam-toggle-btn {
  color: #64748b;
}

[data-theme="light"] .header__exam-toggle-btn--ege:not(.header__exam-toggle-btn--active) {
  border-color: rgba(5, 184, 125, 0.44);
  color: #047857;
  background: rgba(236, 253, 245, 0.55);
}

[data-theme="light"] .header__exam-toggle-btn--oge:not(.header__exam-toggle-btn--active) {
  border-color: rgba(20, 184, 166, 0.44);
  color: #0f766e;
  background: rgba(240, 253, 250, 0.55);
}

[data-theme="light"] .header__exam-toggle--premium .header__exam-toggle-btn--ege:not(.header__exam-toggle-btn--active) {
  box-shadow:
    0 0 0 1px rgba(5, 184, 125, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .header__exam-toggle--premium .header__exam-toggle-btn--oge:not(.header__exam-toggle-btn--active) {
  box-shadow:
    0 0 0 1px rgba(20, 184, 166, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .header__exam-toggle--premium .header__exam-toggle-btn--ege.header__exam-toggle-btn--active {
  color: #047857;
  border-color: rgba(5, 184, 125, 0.58);
  background: linear-gradient(
    165deg,
    rgba(209, 250, 229, 0.98) 0%,
    rgba(167, 243, 208, 0.92) 55%,
    rgba(236, 253, 245, 0.98) 100%
  );
  box-shadow:
    0 4px 16px rgba(5, 184, 125, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
}

[data-theme="light"] .header__exam-toggle--premium .header__exam-toggle-btn--oge.header__exam-toggle-btn--active {
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.58);
  background: linear-gradient(
    165deg,
    rgba(204, 251, 241, 0.98) 0%,
    rgba(153, 246, 228, 0.92) 55%,
    rgba(240, 253, 250, 0.98) 100%
  );
  box-shadow:
    0 4px 16px rgba(20, 184, 166, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
}

/* Варианты / Тренажеры — сегментированная пара */
.header__site-pair .header__site-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.42rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text-muted);
  border-radius: 9999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.header__site-pair .header__site-link:hover {
  color: var(--white);
}

.header__site-link__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.32rem;
  font-size: 0.95em;
  line-height: 1;
  opacity: 0.92;
  transform: translateY(-0.04em);
}

.header__site-pair > .header__site-link--home {
  border-top-left-radius: 0.65rem;
  border-bottom-left-radius: 0.65rem;
  border-top-right-radius: 0.35rem;
  border-bottom-right-radius: 0.35rem;
  border-right-color: rgba(255, 255, 255, 0.08);
}

.header__site-pair > .header__site-link--variants {
  border-radius: 0.35rem;
  border-left-color: rgba(255, 255, 255, 0.08);
  border-right-color: rgba(255, 255, 255, 0.08);
}

.header__site-pair > .header__site-link--trainers {
  border-top-left-radius: 0.35rem;
  border-bottom-left-radius: 0.35rem;
  border-top-right-radius: 0.65rem;
  border-bottom-right-radius: 0.65rem;
  border-left-color: rgba(255, 255, 255, 0.08);
}

.header__site-pair .header__site-link:hover {
  transform: none;
  z-index: 1;
}

.header__site-pair--premium .header__site-link--home {
  min-width: 5.35rem;
  color: #fffbeb;
  border: 1px solid rgba(251, 191, 36, 0.72);
  background: linear-gradient(
    165deg,
    rgba(245, 158, 11, 0.62) 0%,
    rgba(217, 119, 6, 0.42) 48%,
    rgba(180, 83, 9, 0.22) 100%
  );
  box-shadow:
    0 4px 22px rgba(245, 158, 11, 0.38),
    0 0 0 1px rgba(251, 191, 36, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-shadow: 0 1px 10px rgba(180, 83, 9, 0.35);
}

.header__site-pair--premium .header__site-link--home:hover {
  color: #fff;
  border-color: rgba(253, 224, 71, 0.92);
  background: linear-gradient(
    165deg,
    rgba(251, 191, 36, 0.72) 0%,
    rgba(245, 158, 11, 0.52) 50%,
    rgba(217, 119, 6, 0.28) 100%
  );
  box-shadow:
    0 6px 28px rgba(245, 158, 11, 0.48),
    0 0 0 1px rgba(253, 224, 71, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.header__site-pair--premium .header__site-link--home.header__site-link--active {
  color: #fff;
  border-color: rgba(253, 224, 71, 0.95);
  background: linear-gradient(
    165deg,
    rgba(251, 191, 36, 0.78) 0%,
    rgba(245, 158, 11, 0.58) 52%,
    rgba(217, 119, 6, 0.32) 100%
  );
  box-shadow:
    0 8px 32px rgba(245, 158, 11, 0.52),
    0 0 0 1px rgba(251, 191, 36, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

/* Premium: подсветка как у ЕГЭ/ОГЭ и пилюль тренажёров */
.header__site-pair--premium {
  padding: 0.22rem;
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    165deg,
    rgba(18, 24, 32, 0.88) 0%,
    rgba(12, 16, 22, 0.78) 100%
  );
  box-shadow:
    0 6px 26px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(5, 184, 125, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.header__site-pair--premium .header__site-link {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.header__site-pair--premium .header__site-link--variants {
  color: #ecfdf5;
  border: 1px solid rgba(5, 184, 125, 0.52);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.38) 0%,
    rgba(16, 185, 129, 0.22) 48%,
    rgba(5, 184, 125, 0.1) 100%
  );
  box-shadow:
    0 3px 16px rgba(5, 184, 125, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.header__site-pair--premium .header__site-link--variants:hover {
  color: #fff;
  border-color: rgba(110, 231, 183, 0.78);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.48) 0%,
    rgba(16, 185, 129, 0.3) 50%,
    rgba(5, 184, 125, 0.14) 100%
  );
  box-shadow:
    0 5px 22px rgba(5, 184, 125, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.header__site-pair--premium .header__site-link--variants.header__site-link--active {
  color: #fff;
  border-color: rgba(110, 231, 183, 0.92);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.58) 0%,
    rgba(16, 185, 129, 0.38) 52%,
    rgba(5, 184, 125, 0.2) 100%
  );
  box-shadow:
    0 6px 28px rgba(5, 184, 125, 0.42),
    0 0 0 1px rgba(5, 184, 125, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.header__site-pair--premium .header__site-link--trainers {
  color: #f5f3ff;
  border: 1px solid rgba(99, 102, 241, 0.55);
  background: linear-gradient(
    165deg,
    rgba(79, 70, 229, 0.4) 0%,
    rgba(99, 102, 241, 0.24) 48%,
    rgba(139, 92, 246, 0.12) 100%
  );
  box-shadow:
    0 3px 16px rgba(79, 70, 229, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.header__site-pair--premium .header__site-link--trainers:hover {
  color: #fff;
  border-color: rgba(165, 180, 252, 0.82);
  background: linear-gradient(
    165deg,
    rgba(79, 70, 229, 0.5) 0%,
    rgba(99, 102, 241, 0.32) 50%,
    rgba(139, 92, 246, 0.18) 100%
  );
  box-shadow:
    0 5px 22px rgba(99, 102, 241, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.header__site-pair--premium .header__site-link--trainers.header__site-link--active {
  color: #fff;
  border-color: rgba(165, 180, 252, 0.92);
  background: linear-gradient(
    165deg,
    rgba(79, 70, 229, 0.58) 0%,
    rgba(99, 102, 241, 0.4) 52%,
    rgba(139, 92, 246, 0.22) 100%
  );
  box-shadow:
    0 6px 28px rgba(99, 102, 241, 0.42),
    0 0 0 1px rgba(99, 102, 241, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

[data-theme="light"] .header__site-pair--premium {
  border-color: rgba(5, 184, 125, 0.16);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(248, 252, 250, 0.9) 100%
  );
  box-shadow:
    0 6px 22px rgba(26, 36, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .header__site-pair--premium .header__site-link--home {
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.52);
  background: linear-gradient(
    165deg,
    rgba(254, 243, 199, 0.98) 0%,
    rgba(253, 230, 138, 0.92) 55%,
    rgba(255, 251, 235, 0.96) 100%
  );
  box-shadow:
    0 4px 16px rgba(245, 158, 11, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  text-shadow: none;
}

[data-theme="light"] .header__site-pair--premium .header__site-link--home:hover,
[data-theme="light"] .header__site-pair--premium .header__site-link--home.header__site-link--active {
  color: #78350f;
  border-color: rgba(217, 119, 6, 0.58);
  box-shadow:
    0 6px 22px rgba(245, 158, 11, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

[data-theme="light"] .header__site-pair--premium .header__site-link--variants {
  color: #047857;
  border-color: rgba(5, 184, 125, 0.42);
  background: linear-gradient(
    165deg,
    rgba(209, 250, 229, 0.98) 0%,
    rgba(167, 243, 208, 0.9) 55%,
    rgba(236, 253, 245, 0.95) 100%
  );
  box-shadow:
    0 3px 14px rgba(5, 184, 125, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .header__site-pair--premium .header__site-link--variants:hover,
[data-theme="light"] .header__site-pair--premium .header__site-link--variants.header__site-link--active {
  color: #065f46;
  border-color: rgba(5, 184, 125, 0.58);
  box-shadow:
    0 6px 22px rgba(5, 184, 125, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

[data-theme="light"] .header__site-pair--premium .header__site-link--trainers {
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(
    165deg,
    rgba(224, 231, 255, 0.98) 0%,
    rgba(199, 210, 254, 0.92) 55%,
    rgba(237, 233, 254, 0.95) 100%
  );
  box-shadow:
    0 3px 14px rgba(79, 70, 229, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .header__site-pair--premium .header__site-link--trainers:hover,
[data-theme="light"] .header__site-pair--premium .header__site-link--trainers.header__site-link--active {
  color: #3730a3;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow:
    0 6px 22px rgba(79, 70, 229, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.header__site-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.header__site-nav-link:hover {
  color: var(--white);
  border-color: rgba(5, 184, 125, 0.35);
  background: rgba(5, 184, 125, 0.08);
}

.header__site-nav-link--active {
  color: var(--green);
  border-color: rgba(5, 184, 125, 0.45);
  background: rgba(5, 184, 125, 0.12);
}

.header--task .header__site-nav {
  margin-left: 0;
  margin-right: 0.15rem;
  flex-shrink: 0;
}

.header--task .header__site-nav-link {
  border-radius: 9999px;
}

/* Premium nav pills — общая база */
.header__site-nav-link--premium {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.header--task .header__site-nav-link--premium {
  padding: 0.5rem 1.15rem;
  font-size: 0.8125rem;
}

/* Станция ЕГЭ — зелёная подсветка */
.header__site-nav-link--premium-ege {
  color: #ecfdf5;
  border: 1px solid rgba(5, 184, 125, 0.55);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.4) 0%,
    rgba(16, 185, 129, 0.24) 48%,
    rgba(5, 184, 125, 0.1) 100%
  );
  box-shadow:
    0 4px 20px rgba(5, 184, 125, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    inset 0 -1px 0 rgba(0, 0, 0, 0.16);
}

.header__site-nav-link--premium-ege:hover {
  color: #fff;
  border-color: rgba(110, 231, 183, 0.85);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.52) 0%,
    rgba(16, 185, 129, 0.34) 50%,
    rgba(5, 184, 125, 0.16) 100%
  );
  box-shadow:
    0 6px 26px rgba(5, 184, 125, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
  transform: translateY(-1px);
}

.header__site-nav-link--premium-ege.header__site-nav-link--active {
  color: #fff;
  border-color: rgba(110, 231, 183, 0.92);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.58) 0%,
    rgba(16, 185, 129, 0.38) 52%,
    rgba(5, 184, 125, 0.2) 100%
  );
  box-shadow:
    0 6px 28px rgba(5, 184, 125, 0.42),
    0 0 0 1px rgba(5, 184, 125, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

/* Тренажер ОГЭ — бирюзовая подсветка */
.header__site-nav-link--premium-oge {
  color: #f0fdfa;
  border: 1px solid rgba(20, 184, 166, 0.55);
  background: linear-gradient(
    165deg,
    rgba(13, 148, 136, 0.44) 0%,
    rgba(20, 184, 166, 0.28) 48%,
    rgba(45, 212, 191, 0.12) 100%
  );
  box-shadow:
    0 4px 20px rgba(20, 184, 166, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    inset 0 -1px 0 rgba(0, 0, 0, 0.16);
}

.header__site-nav-link--premium-oge:hover {
  color: #fff;
  border-color: rgba(94, 234, 212, 0.85);
  background: linear-gradient(
    165deg,
    rgba(13, 148, 136, 0.56) 0%,
    rgba(20, 184, 166, 0.36) 50%,
    rgba(45, 212, 191, 0.18) 100%
  );
  box-shadow:
    0 6px 26px rgba(20, 184, 166, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
  transform: translateY(-1px);
}

.header__site-nav-link--premium-oge.header__site-nav-link--active {
  color: #fff;
  border-color: rgba(94, 234, 212, 0.92);
  background: linear-gradient(
    165deg,
    rgba(13, 148, 136, 0.6) 0%,
    rgba(20, 184, 166, 0.4) 52%,
    rgba(45, 212, 191, 0.22) 100%
  );
  box-shadow:
    0 6px 28px rgba(20, 184, 166, 0.42),
    0 0 0 1px rgba(20, 184, 166, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

[data-theme="light"] .header__site-nav-link--premium-ege {
  color: #064e3b;
  border-color: rgba(5, 184, 125, 0.45);
  background: linear-gradient(
    165deg,
    rgba(209, 250, 229, 0.98) 0%,
    rgba(167, 243, 208, 0.92) 55%,
    rgba(236, 253, 245, 0.98) 100%
  );
  box-shadow:
    0 4px 16px rgba(5, 184, 125, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
}

[data-theme="light"] .header__site-nav-link--premium-ege:hover,
[data-theme="light"] .header__site-nav-link--premium-ege.header__site-nav-link--active {
  color: #047857;
  border-color: rgba(5, 184, 125, 0.58);
  box-shadow:
    0 6px 22px rgba(5, 184, 125, 0.2),
    0 1px 0 rgba(255, 255, 255, 1) inset;
}

[data-theme="light"] .header__site-nav-link--premium-oge {
  color: #134e4a;
  border-color: rgba(20, 184, 166, 0.45);
  background: linear-gradient(
    165deg,
    rgba(204, 251, 241, 0.98) 0%,
    rgba(153, 246, 228, 0.92) 55%,
    rgba(240, 253, 250, 0.98) 100%
  );
  box-shadow:
    0 4px 16px rgba(20, 184, 166, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
}

[data-theme="light"] .header__site-nav-link--premium-oge:hover,
[data-theme="light"] .header__site-nav-link--premium-oge.header__site-nav-link--active {
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.58);
  box-shadow:
    0 6px 22px rgba(20, 184, 166, 0.2),
    0 1px 0 rgba(255, 255, 255, 1) inset;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Auth в шапке */
.header__auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Имя = кнопка входа в ЛК */
.header__user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 10rem;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(5, 184, 125, 0.28);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s ease;
}

[data-theme="light"] .header__user {
  border-color: rgba(5, 184, 125, 0.2);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(26, 36, 48, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.header__user:hover {
  color: var(--green);
  border-color: rgba(5, 184, 125, 0.55);
  background: rgba(5, 184, 125, 0.12);
  box-shadow: 0 4px 14px rgba(5, 184, 125, 0.12);
  transform: translateY(-1px);
}

.header__logout-form {
  margin: 0;
  display: none;
}

.header__auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.18s ease;
}

.header__auth-btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(5, 184, 125, 0.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .header__auth-btn--ghost {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(5, 184, 125, 0.18);
  box-shadow: 0 2px 8px rgba(26, 36, 48, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.header__auth-btn--ghost:hover {
  color: var(--green);
  border-color: rgba(5, 184, 125, 0.5);
  background: rgba(5, 184, 125, 0.08);
  transform: translateY(-1px);
}

.header__logout-btn {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.38);
  background: linear-gradient(
    165deg,
    rgba(239, 68, 68, 0.18) 0%,
    rgba(220, 38, 38, 0.09) 100%
  );
  box-shadow:
    0 2px 10px rgba(239, 68, 68, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header__logout-btn:hover {
  color: #fee2e2;
  border-color: rgba(248, 113, 113, 0.58);
  background: linear-gradient(
    165deg,
    rgba(239, 68, 68, 0.26) 0%,
    rgba(220, 38, 38, 0.14) 100%
  );
  box-shadow:
    0 4px 14px rgba(239, 68, 68, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .header__logout-btn {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.32);
  background: linear-gradient(
    165deg,
    rgba(254, 226, 226, 0.95) 0%,
    rgba(254, 242, 242, 0.88) 100%
  );
  box-shadow:
    0 2px 10px rgba(239, 68, 68, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .header__logout-btn:hover {
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.48);
  background: linear-gradient(
    165deg,
    rgba(254, 202, 202, 0.98) 0%,
    rgba(254, 226, 226, 0.92) 100%
  );
  box-shadow:
    0 4px 14px rgba(239, 68, 68, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.header__auth-btn--primary {
  background: linear-gradient(180deg, #06c98a 0%, var(--green) 100%);
  color: #0a0a0a;
  border: 1px solid rgba(5, 184, 125, 0.45);
  box-shadow: 0 3px 12px rgba(5, 184, 125, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.header__auth-btn--primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 16px rgba(5, 184, 125, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 0.5rem;
}

.header__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.header__link:hover {
  color: var(--green);
}

.header__calc-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.9rem;
  border-radius: 9999px;
  background: linear-gradient(165deg, rgba(5, 184, 125, 0.2) 0%, rgba(5, 184, 125, 0.11) 100%);
  border: 1px solid rgba(5, 184, 125, 0.45);
  color: var(--green);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
  box-shadow:
    0 2px 12px rgba(5, 184, 125, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.header__calc-pill:hover {
  background: linear-gradient(165deg, rgba(5, 184, 125, 0.28) 0%, rgba(5, 184, 125, 0.16) 100%);
  border-color: rgba(5, 184, 125, 0.65);
  box-shadow:
    0 4px 18px rgba(5, 184, 125, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

[data-theme="light"] .header__calc-pill {
  background: linear-gradient(165deg, rgba(5, 184, 125, 0.14) 0%, rgba(5, 184, 125, 0.06) 100%);
  border-color: rgba(5, 184, 125, 0.38);
  box-shadow:
    0 2px 10px rgba(5, 184, 125, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .header__calc-pill:hover {
  background: linear-gradient(165deg, rgba(5, 184, 125, 0.2) 0%, rgba(5, 184, 125, 0.1) 100%);
}

/* Тренажёры в шапке — подсветка в цветах брендов / смысла инструмента */
.header__calc-pill--libreoffice {
  color: #c8f5c0;
  border-color: rgba(24, 163, 3, 0.55);
  background: linear-gradient(
    165deg,
    rgba(24, 163, 3, 0.34) 0%,
    rgba(14, 138, 0, 0.18) 55%,
    rgba(150, 200, 45, 0.1) 100%
  );
  box-shadow:
    0 2px 14px rgba(24, 163, 3, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.header__calc-pill--libreoffice:hover {
  color: #e8ffe4;
  border-color: rgba(36, 190, 12, 0.75);
  background: linear-gradient(
    165deg,
    rgba(24, 163, 3, 0.44) 0%,
    rgba(14, 138, 0, 0.24) 55%,
    rgba(150, 200, 45, 0.14) 100%
  );
  box-shadow:
    0 4px 20px rgba(24, 163, 3, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.header__calc-pill--python {
  color: #b8d4f0;
  border-color: rgba(55, 118, 171, 0.58);
  background: linear-gradient(
    165deg,
    rgba(55, 118, 171, 0.38) 0%,
    rgba(48, 105, 152, 0.2) 50%,
    rgba(255, 212, 59, 0.14) 100%
  );
  box-shadow:
    0 2px 14px rgba(55, 118, 171, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.header__calc-pill--python:hover {
  color: #e3f0ff;
  border-color: rgba(70, 140, 200, 0.78);
  background: linear-gradient(
    165deg,
    rgba(55, 118, 171, 0.48) 0%,
    rgba(48, 105, 152, 0.26) 48%,
    rgba(255, 212, 59, 0.2) 100%
  );
  box-shadow:
    0 4px 20px rgba(55, 118, 171, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.header__calc-pill--calculator {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(
    165deg,
    rgba(234, 88, 12, 0.32) 0%,
    rgba(245, 158, 11, 0.2) 55%,
    rgba(251, 191, 36, 0.12) 100%
  );
  box-shadow:
    0 2px 14px rgba(234, 88, 12, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.header__calc-pill--calculator:hover {
  color: #fff7ed;
  border-color: rgba(251, 146, 60, 0.75);
  background: linear-gradient(
    165deg,
    rgba(234, 88, 12, 0.42) 0%,
    rgba(245, 158, 11, 0.28) 55%,
    rgba(251, 191, 36, 0.16) 100%
  );
  box-shadow:
    0 4px 20px rgba(234, 88, 12, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.header__calc-pill--turing {
  color: #ddd6fe;
  border-color: rgba(99, 102, 241, 0.55);
  background: linear-gradient(
    165deg,
    rgba(79, 70, 229, 0.36) 0%,
    rgba(99, 102, 241, 0.22) 50%,
    rgba(139, 92, 246, 0.14) 100%
  );
  box-shadow:
    0 2px 14px rgba(79, 70, 229, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.header__calc-pill--turing:hover {
  color: #f5f3ff;
  border-color: rgba(129, 140, 248, 0.78);
  background: linear-gradient(
    165deg,
    rgba(79, 70, 229, 0.46) 0%,
    rgba(99, 102, 241, 0.3) 50%,
    rgba(139, 92, 246, 0.18) 100%
  );
  box-shadow:
    0 4px 20px rgba(79, 70, 229, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .header__calc-pill--libreoffice {
  color: #166534;
  border-color: rgba(22, 163, 74, 0.45);
  background: linear-gradient(
    165deg,
    rgba(187, 247, 208, 0.95) 0%,
    rgba(220, 252, 231, 0.9) 100%
  );
  box-shadow:
    0 2px 10px rgba(22, 163, 74, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .header__calc-pill--libreoffice:hover {
  color: #14532d;
  border-color: rgba(22, 163, 74, 0.62);
  background: linear-gradient(
    165deg,
    rgba(134, 239, 172, 0.98) 0%,
    rgba(220, 252, 231, 0.95) 100%
  );
}

[data-theme="light"] .header__calc-pill--python {
  color: #1e40af;
  border-color: rgba(55, 118, 171, 0.42);
  background: linear-gradient(
    165deg,
    rgba(191, 219, 254, 0.95) 0%,
    rgba(254, 243, 199, 0.75) 100%
  );
  box-shadow:
    0 2px 10px rgba(55, 118, 171, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .header__calc-pill--python:hover {
  color: #1e3a8a;
  border-color: rgba(55, 118, 171, 0.58);
  background: linear-gradient(
    165deg,
    rgba(147, 197, 253, 0.98) 0%,
    rgba(253, 230, 138, 0.85) 100%
  );
}

[data-theme="light"] .header__calc-pill--calculator {
  color: #9a3412;
  border-color: rgba(234, 88, 12, 0.4);
  background: linear-gradient(
    165deg,
    rgba(254, 215, 170, 0.95) 0%,
    rgba(255, 247, 237, 0.92) 100%
  );
  box-shadow:
    0 2px 10px rgba(234, 88, 12, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .header__calc-pill--calculator:hover {
  color: #7c2d12;
  border-color: rgba(234, 88, 12, 0.55);
  background: linear-gradient(
    165deg,
    rgba(253, 186, 116, 0.98) 0%,
    rgba(255, 247, 237, 0.95) 100%
  );
}

[data-theme="light"] .header__calc-pill--turing {
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.42);
  background: linear-gradient(
    165deg,
    rgba(224, 231, 255, 0.96) 0%,
    rgba(237, 233, 254, 0.92) 100%
  );
  box-shadow:
    0 2px 10px rgba(79, 70, 229, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .header__calc-pill--turing:hover {
  color: #3730a3;
  border-color: rgba(99, 102, 241, 0.58);
  background: linear-gradient(
    165deg,
    rgba(199, 210, 254, 0.98) 0%,
    rgba(237, 233, 254, 0.95) 100%
  );
}

.header__trainers-nav--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

/* Calc/Python, Калькулятор/Тьюринг, Вход/Регистрация — сегментированные пары */
.header__trainer-pair,
.header__auth-pair {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  padding: 0.18rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 14, 20, 0.62);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header__trainer-pair-divider,
.header__auth-pair-divider {
  align-self: center;
  width: 1px;
  height: 1.55rem;
  margin: 0 0.08rem;
  flex-shrink: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.22) 18%,
    rgba(255, 255, 255, 0.22) 82%,
    rgba(255, 255, 255, 0) 100%
  );
}

.header__trainer-pair .header__calc-pill {
  border-radius: 9999px;
  box-shadow: none;
}

.header__trainer-pair > .header__calc-pill:first-of-type {
  border-top-right-radius: 0.65rem;
  border-bottom-right-radius: 0.65rem;
  border-right-color: rgba(255, 255, 255, 0.08);
}

.header__trainer-pair > .header__calc-pill:last-of-type {
  border-top-left-radius: 0.65rem;
  border-bottom-left-radius: 0.65rem;
  border-left-color: rgba(255, 255, 255, 0.08);
}

.header__trainer-pair .header__calc-pill:hover {
  transform: none;
  z-index: 1;
}

.header__auth-pair .header__auth-btn {
  border-radius: 9999px;
}

.header__auth-pair .header__user {
  border-radius: 9999px;
  box-shadow: none;
}

.header__auth-pair > .header__user,
.header__auth-pair > .header__auth-btn:first-of-type {
  border-top-right-radius: 0.65rem;
  border-bottom-right-radius: 0.65rem;
  border-right-color: rgba(255, 255, 255, 0.08);
}

.header__auth-pair > .header__auth-btn:last-of-type {
  border-top-left-radius: 0.65rem;
  border-bottom-left-radius: 0.65rem;
  border-left-color: rgba(255, 255, 255, 0.08);
}

.header__auth-pair .header__auth-btn:hover,
.header__auth-pair .header__user:hover {
  transform: none;
  z-index: 1;
}

@media (max-width: 520px) {
  .header__auth-pair--account {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .header__auth-pair--account .header__auth-pair-divider {
    display: none;
  }

  .header__auth-pair--account .header__user {
    border-radius: 10px;
    border-right-color: rgba(5, 184, 125, 0.28);
    box-shadow:
      0 2px 10px rgba(0, 0, 0, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  [data-theme="light"] .header__auth-pair--account .header__user {
    border-right-color: rgba(5, 184, 125, 0.2);
    box-shadow:
      0 2px 10px rgba(26, 36, 48, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }
}

[data-theme="light"] .header__trainer-pair,
[data-theme="light"] .header__auth-pair {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 4px 14px rgba(26, 36, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .header__trainer-pair-divider,
[data-theme="light"] .header__auth-pair-divider {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.14) 18%,
    rgba(15, 23, 42, 0.14) 82%,
    rgba(15, 23, 42, 0) 100%
  );
}

.header__burger-nav .header__trainer-pair {
  width: 100%;
}

.header__burger-nav .header__trainer-pair .header__calc-pill {
  flex: 1 1 0;
  justify-content: center;
}

.header__admin-link {
  flex-shrink: 0;
}

/* На десктопе панель бургера скрыта (разметка есть только если есть тренажёры или вход) */
.header__burger {
  display: none;
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-footer);
  position: relative;
  z-index: 10;
}

.footer__link {
  color: var(--text-footer);
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--text-muted);
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
  position: relative;
  z-index: 5;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* Premium: главный заголовок hero */
.hero__title-main {
  display: inline-block;
  position: relative;
  padding-bottom: 0.35rem;
  background: linear-gradient(
    118deg,
    #f8fafc 0%,
    #d1fae5 18%,
    #6ee7b7 38%,
    #34d399 52%,
    #7dd3fc 72%,
    #e2e8f0 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 28px rgba(5, 184, 125, 0.32))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.12));
}

.hero__title-main::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 22rem);
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.15) 0%,
    rgba(5, 184, 125, 0.95) 42%,
    rgba(5, 184, 125, 0.65) 58%,
    rgba(248, 113, 113, 0.35) 100%
  );
  box-shadow:
    0 0 20px rgba(5, 184, 125, 0.45),
    0 0 40px rgba(5, 184, 125, 0.15);
  opacity: 0.92;
}

[data-theme="light"] .hero__title-main {
  background: linear-gradient(
    118deg,
    #0f172a 0%,
    #065f46 22%,
    #059669 42%,
    #047857 55%,
    #1d4ed8 78%,
    #0f172a 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 3px 18px rgba(5, 184, 125, 0.2));
}

[data-theme="light"] .hero__title-main::after {
  opacity: 0.88;
  box-shadow:
    0 0 16px rgba(5, 184, 125, 0.28),
    0 0 32px rgba(5, 184, 125, 0.1);
}

/* Скрыто по запросу — блок «думай · кодируй · победи» */
.hero-pulse--premium {
  display: none !important;
}

.hero__title-accent {
  display: block;
  margin-top: 0.75rem;
}

/* Premium: пульс «думай · кодируй · победи» */
.hero-pulse--premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0;
  padding: 0.3rem 0.45rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    165deg,
    rgba(18, 24, 32, 0.82) 0%,
    rgba(12, 16, 22, 0.72) 100%
  );
  box-shadow:
    0 6px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(5, 184, 125, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-family: "Fira Code", ui-monospace, monospace;
  font-size: clamp(1rem, 2.1vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

.hero-pulse--premium .hero-pulse__word {
  display: inline-flex;
  align-items: center;
  padding: 0.38em 0.72em;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(226, 232, 240, 0.5);
  background: rgba(255, 255, 255, 0.04);
  transition:
    color 0.45s ease,
    border-color 0.45s ease,
    background 0.45s ease,
    box-shadow 0.45s ease,
    text-shadow 0.45s ease,
    transform 0.45s ease;
}

.hero-pulse--premium .hero-pulse__word[data-active] {
  color: #fff;
  border-color: rgba(110, 231, 183, 0.72);
  background: linear-gradient(
    165deg,
    rgba(5, 184, 125, 0.48) 0%,
    rgba(16, 185, 129, 0.3) 52%,
    rgba(59, 130, 246, 0.14) 100%
  );
  box-shadow:
    0 4px 20px rgba(5, 184, 125, 0.38),
    0 0 0 1px rgba(5, 184, 125, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  text-shadow: 0 0 18px rgba(5, 184, 125, 0.55);
  transform: translateY(-1px) scale(1.02);
}

.hero-pulse--premium .hero-pulse__sep {
  color: rgba(148, 163, 184, 0.45);
  font-weight: 400;
  user-select: none;
  padding: 0 0.05em;
}

[data-theme="light"] .hero-pulse--premium {
  border-color: rgba(5, 184, 125, 0.16);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(248, 252, 250, 0.9) 100%
  );
  box-shadow:
    0 6px 22px rgba(26, 36, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .hero-pulse--premium .hero-pulse__word {
  color: rgba(71, 85, 105, 0.65);
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .hero-pulse--premium .hero-pulse__word[data-active] {
  color: #065f46;
  border-color: rgba(5, 184, 125, 0.5);
  background: linear-gradient(
    165deg,
    rgba(209, 250, 229, 0.98) 0%,
    rgba(167, 243, 208, 0.92) 55%,
    rgba(219, 234, 254, 0.75) 100%
  );
  text-shadow: 0 0 12px rgba(5, 184, 125, 0.25);
  box-shadow:
    0 4px 18px rgba(5, 184, 125, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

[data-theme="light"] .hero-pulse--premium .hero-pulse__sep {
  color: rgba(100, 116, 139, 0.55);
}

.hero-pulse {
  font-family: "Fira Code", ui-monospace, monospace;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0;
}

.hero-pulse__word {
  color: rgba(255, 255, 255, 0.4);
  padding: 0.15em 0.35em;
  border-radius: 0.25em;
  transition: color 0.5s ease, background 0.5s ease, text-shadow 0.5s ease;
}

[data-theme="light"] .hero-pulse__word {
  color: rgba(0, 0, 0, 0.35);
}

.hero-pulse__word[data-active] {
  color: var(--green);
  background: rgba(5, 184, 125, 0.12);
  text-shadow: 0 0 20px rgba(5, 184, 125, 0.4);
}

.fab-cta {
  position: fixed;
  bottom: 3.5rem;
  right: 3.5rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 2.25rem;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  border-radius: 2rem;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(5, 184, 125, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab-cta:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 32px rgba(5, 184, 125, 0.55);
}

/* Task circle */
.task-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 8rem;
  height: 8rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(145deg, #2a2f35 0%, #23282d 50%, #1e2228 100%);
  box-shadow:
    inset 2px 2px 6px rgba(255, 255, 255, 0.08),
    inset -1px -1px 4px rgba(0, 0, 0, 0.2),
    0 6px 16px rgba(0, 0, 0, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.2);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
  transform-style: preserve-3d;
  will-change: transform;
  opacity: 0;
  transform: translateY(24px) scale(0.92);
  animation: circle-appear 0.5s ease forwards;
}

[data-theme="light"] .task-circle {
  border-color: rgba(0, 0, 0, 0.2);
  background: linear-gradient(145deg, #ffffff 0%, #f0f0f2 50%, #e8e8ec 100%);
  box-shadow:
    inset 2px 2px 6px rgba(255, 255, 255, 0.8),
    inset -1px -1px 4px rgba(0, 0, 0, 0.06),
    0 6px 16px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .task-circle:hover {
  border-color: var(--green);
  box-shadow:
    inset 2px 2px 6px rgba(255, 255, 255, 0.9),
    0 8px 24px rgba(0, 0, 0, 0.1),
    0 0 16px rgba(5, 184, 125, 0.2);
}

.task-circle:hover {
  border-color: var(--green);
  transform: translateY(-4px) scale(1.06);
  box-shadow:
    inset 2px 2px 6px rgba(255, 255, 255, 0.1),
    inset -1px -1px 4px rgba(0, 0, 0, 0.15),
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(5, 184, 125, 0.3);
}

@keyframes circle-appear {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.task-circle__number {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 600;
}

.task-circle__icons {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.task-circle__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Task grid — 3 ряда по 9 */
.task-grid {
  display: grid;
  grid-template-columns: repeat(9, 8rem);
  grid-template-rows: repeat(3, 8rem);
  gap: 1.5rem;
  justify-content: center;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  position: relative;
  z-index: 5;
}

.task-grid--oge {
  grid-template-columns: repeat(8, 8rem);
  grid-template-rows: repeat(2, 8rem);
}

/* Canvas background */
.canvas-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.canvas-bg__canvas {
  width: 100%;
  height: 100%;
  opacity: 0.25;
}

/* ——— Главная и общий хедер: планшеты / смартфоны ——— */
@media (max-width: 900px) {
  .header {
    padding: calc(0.45rem * var(--header-scale)) 1rem;
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .header--home:has(.header__site-nav) {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .header--home:has(.header__site-nav) .header__brand {
    flex: 0 1 auto;
  }

  .header--home:has(.header__site-nav) .header__site-nav {
    order: 10;
    flex: 1 1 100%;
    justify-content: center;
    margin-top: 0.15rem;
  }

  .header__logo-img {
    width: clamp(
      calc(11rem * var(--header-scale)),
      calc(52vw * var(--header-scale)),
      calc(18rem * var(--header-scale))
    );
  }

  .header__right {
    gap: 0.45rem;
  }

  .header__calc-pill {
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
  }

  .hero {
    padding: 2.25rem 1rem 2rem;
  }

  .task-grid {
    grid-template-columns: repeat(5, 6.75rem);
    grid-template-rows: none;
    grid-auto-rows: 6.75rem;
    gap: 1rem;
    justify-content: center;
    padding: 0 1rem 2.5rem;
  }

  .task-grid--oge {
    grid-template-columns: repeat(4, 6.75rem);
  }

  .task-circle {
    width: 6.75rem;
    height: 6.75rem;
  }

  .task-circle__number {
    font-size: 1.85rem;
  }
}

@media (max-width: 520px) {
  .header__logo-img {
    width: min(calc(17rem * var(--header-scale)), calc(88vw * var(--header-scale)));
  }

  .header__auth {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .header__user {
    max-width: min(10rem, 42vw);
  }

  .header__trainers-nav--inline {
    display: none;
  }

  .header__desktop-only {
    display: none !important;
  }

  .header__burger {
    display: block;
    position: relative;
    flex-shrink: 0;
  }

  .header__burger-summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(5, 184, 125, 0.28);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  [data-theme="light"] .header__burger-summary {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(5, 184, 125, 0.22);
    box-shadow: 0 2px 10px rgba(26, 36, 48, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }

  .header__burger-summary::-webkit-details-marker {
    display: none;
  }

  .header__burger-icon {
    display: block;
    width: 1.1rem;
    height: 2px;
    border-radius: 1px;
    background: var(--green);
    box-shadow: 0 -5px 0 var(--green), 0 5px 0 var(--green);
  }

  .header__burger-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 12.75rem;
    max-width: min(18rem, calc(100vw - 2rem));
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(5, 184, 125, 0.28);
    background: linear-gradient(175deg, rgba(28, 33, 38, 0.97) 0%, rgba(22, 26, 31, 0.98) 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 120;
  }

  [data-theme="light"] .header__burger-panel {
    background: linear-gradient(175deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 252, 250, 0.98) 100%);
    border-color: rgba(5, 184, 125, 0.22);
    box-shadow: 0 12px 36px rgba(26, 36, 48, 0.12);
  }

  .header__burger-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .header__calc-pill--burger {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .header__burger-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid rgba(5, 184, 125, 0.22);
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }

  .header__burger-link:hover {
    color: var(--green);
    border-color: rgba(5, 184, 125, 0.45);
    background: rgba(5, 184, 125, 0.08);
  }

  [data-theme="light"] .header__burger-link {
    background: rgba(255, 255, 255, 0.78);
  }

  .header__burger-logout {
    display: flex;
    width: 100%;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid rgba(5, 184, 125, 0.22);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }

  .header__burger-logout:hover {
    color: var(--green);
    border-color: rgba(5, 184, 125, 0.45);
    background: rgba(5, 184, 125, 0.08);
  }

  [data-theme="light"] .header__burger-logout {
    background: rgba(255, 255, 255, 0.78);
  }

  .hero {
    display: none;
  }

  .task-grid {
    grid-template-columns: repeat(3, 6rem);
    grid-auto-rows: 6rem;
    gap: 0.65rem 0.5rem;
    padding: 0 0.75rem 2.25rem;
  }

  .task-circle {
    width: 6rem;
    height: 6rem;
  }

  .task-circle__number {
    font-size: 1.6rem;
  }

  .task-circle__icons {
    gap: 0.25rem;
    margin-top: 0.15rem;
  }

  .task-circle__icon {
    width: 16px;
    height: 16px;
  }

  .fab-cta {
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    padding: 0.75rem 1.35rem;
    font-size: 1rem;
    border-radius: 1.5rem;
  }

  .footer {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (pointer: coarse) {
  .hero {
    padding: 0.5rem 1rem 0.35rem;
  }

  .task-grid {
    grid-template-columns: repeat(6, 5.25rem);
    grid-auto-rows: 5.25rem;
    gap: 0.55rem 0.45rem;
    padding: 0 0.75rem 1.25rem;
  }

  .task-grid--oge {
    grid-template-columns: repeat(4, 5.25rem);
  }

  .task-circle {
    width: 5.25rem;
    height: 5.25rem;
  }

  .task-circle__number {
    font-size: 1.45rem;
  }

  .task-circle__icon {
    width: 14px;
    height: 14px;
  }

  .fab-cta {
    bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 520px) and (orientation: landscape) and (pointer: coarse) {
  .task-grid {
    grid-template-columns: repeat(5, 4.75rem);
    grid-auto-rows: 4.75rem;
  }

  .task-grid--oge {
    grid-template-columns: repeat(4, 4.75rem);
  }

  .task-circle {
    width: 4.75rem;
    height: 4.75rem;
  }

  .task-circle__number {
    font-size: 1.3rem;
  }
}
