@property --site-sidebar-width {
  syntax: "<length>";
  inherits: true;
  initial-value: 244px;
}

/* Site-wide left navigation */

:root {
  --site-sidebar-width: 244px;
  --site-sidebar-collapsed-width: 72px;
  --site-sidebar-anim: 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

html.site-sidebar-collapsed {
  --site-sidebar-width: 72px;
}

body.has-site-sidebar {
  padding-left: 244px;
}

/* Логотип в хедере только когда сайдбар скрыт (≤1100px) */
body.has-site-sidebar .header-logo--sidebar-fallback {
  display: none;
}

.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1400;
  width: 244px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #16181d;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  color: #fff;
  overflow: visible;
}

[data-theme="light"] .site-sidebar {
  background: #eef0f4;
  border-right-color: rgba(15, 23, 42, 0.08);
  color: #1a1a2e;
}

.site-sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 20px 14px 16px;
  overflow: hidden;
  transition: padding var(--site-sidebar-anim);
}

.site-sidebar__brand {
  flex-shrink: 0;
  margin: 0 -14px 14px;
  padding: 0 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: margin var(--site-sidebar-anim), padding var(--site-sidebar-anim);
}

[data-theme="light"] .site-sidebar__brand {
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

.site-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  margin: 0 4px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  transition: gap var(--site-sidebar-anim), margin var(--site-sidebar-anim);
}

.site-sidebar__logo:hover,
.site-sidebar__logo:focus {
  color: inherit;
  opacity: 1;
}

/* <picture> на главной - иначе блок не совпадает по высоте с img как на tasks.html */
.site-sidebar__logo picture {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  line-height: 0;
}

.site-sidebar__logo-img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-sidebar__logo-text {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  max-width: 160px;
  opacity: 1;
  transition: opacity 0.45s ease, max-width var(--site-sidebar-anim);
}

.site-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  flex: 1 1 auto;
}

.site-sidebar__section {
  margin: 14px 8px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  overflow: hidden;
  max-height: 24px;
  opacity: 1;
  transition:
    opacity 0.45s ease,
    max-height var(--site-sidebar-anim),
    margin var(--site-sidebar-anim);
}

.site-sidebar__section:first-child {
  margin-top: 0;
}

[data-theme="light"] .site-sidebar__section {
  color: rgba(26, 26, 46, 0.42);
}

.site-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  position: relative;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, gap var(--site-sidebar-anim), padding var(--site-sidebar-anim);
}

/* questions.html временно скрыт на всём сайте (display:flex перебивает [hidden]) */
.site-sidebar__link[href*="questions/questions.html"],
.site-sidebar__link[hidden] {
  display: none !important;
}

[data-theme="light"] .site-sidebar__link {
  color: rgba(26, 26, 46, 0.72);
}

.site-sidebar__link i {
  width: 18px;
  font-size: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.site-sidebar__link-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .site-sidebar__link i {
  color: rgba(26, 26, 46, 0.45);
}

[data-theme="light"] .site-sidebar__link-svg {
  color: rgba(26, 26, 46, 0.45);
}

.site-sidebar__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

[data-theme="light"] .site-sidebar__link:hover {
  background: rgba(108, 124, 255, 0.08);
  color: #1a1a2e;
}

.site-sidebar__link.is-active {
  background: rgba(108, 124, 255, 0.22);
  color: #fff;
}

[data-theme="light"] .site-sidebar__link.is-active {
  background: rgba(108, 124, 255, 0.16);
  color: #1a1a2e;
}

.site-sidebar__link.is-active i {
  color: #8ea5ff;
}

.site-sidebar__link--soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.site-sidebar__link-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  opacity: 1;
  max-width: 180px;
  transition: opacity 0.45s ease, max-width var(--site-sidebar-anim);
}

.site-sidebar__badge {
  display: inline-flex;
  align-items: center;
  position: relative;
  top: 0;
  margin-left: 2px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--accent-orange, #6c7cff);
  color: #111;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.25;
  align-self: flex-start;
  transform: rotate(-8deg);
  transform-origin: left center;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-sidebar__badge--live {
  background: #c5ec7f;
  color: #1f2229;
  top: 3px;
}

.site-sidebar__badge--soon {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  top: 3px;
}

.site-sidebar__link--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

[data-theme="light"] .site-sidebar__badge--soon {
  background: rgba(15, 23, 42, 0.1);
  color: rgba(26, 26, 46, 0.55);
}

[data-theme="light"] .site-sidebar__link--disabled {
  opacity: 0.6;
}

.site-sidebar__badge--muted {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  border: none;
  transform: rotate(-8deg);
  transform-origin: left center;
  letter-spacing: 0.04em;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  align-self: flex-start;
}

[data-theme="light"] .site-sidebar__badge--muted {
  background: rgba(15, 23, 42, 0.12);
  color: rgba(26, 26, 46, 0.48);
  border: none;
}

.site-sidebar__badge--gold {
  background: #ffc629;
  color: #1f2229;
}

.site-sidebar__footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: gap var(--site-sidebar-anim);
}

[data-theme="light"] .site-sidebar__footer {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.site-sidebar__promo,
.site-sidebar__support {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    width var(--site-sidebar-anim),
    height var(--site-sidebar-anim),
    padding var(--site-sidebar-anim),
    margin var(--site-sidebar-anim);
}

.site-sidebar__promo {
  padding: 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(108, 124, 255, 0.16) 0%, rgba(22, 24, 29, 0.2) 100%),
    #1c1f27;
  border: 1px solid rgba(108, 124, 255, 0.22);
}

.site-sidebar__support {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 12px;
  border-radius: 16px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(197, 236, 127, 0.14), transparent 42%),
    radial-gradient(circle at 80% 90%, rgba(108, 124, 255, 0.12), transparent 36%),
    #1a1d24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-sidebar__support:focus-visible {
  outline: 2px solid var(--accent-orange, #6c7cff);
  outline-offset: 2px;
}

.site-sidebar__support-visual {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c5ec7f;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.site-sidebar__support-visual-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(197, 236, 127, 0.22), transparent 62%);
  pointer-events: none;
}

.site-sidebar__support-visual i {
  position: relative;
  z-index: 1;
}

.site-sidebar__support-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

.site-sidebar__support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin-top: 2px;
  padding: 0 12px;
  border-radius: 10px;
  background: #c5ec7f;
  color: #1f2229;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: background-color 0.4s ease;
}

.site-sidebar__support-btn:hover {
  background: #d7f5a3;
}

@keyframes site-sidebar-support-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.55;
  }

  65% {
    transform: scale(2.6);
    opacity: 0;
  }

  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

@keyframes site-sidebar-support-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(197, 236, 127, 0.42);
    opacity: 0.7;
  }

  70% {
    box-shadow: 0 0 0 7px rgba(197, 236, 127, 0);
    opacity: 0;
  }

  100% {
    box-shadow: 0 0 0 0 rgba(197, 236, 127, 0);
    opacity: 0;
  }
}

@keyframes site-sidebar-support-dot {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

[data-theme="light"] .site-sidebar__support {
  background:
    radial-gradient(circle at 50% 18%, rgba(197, 236, 127, 0.28), transparent 42%),
    radial-gradient(circle at 80% 90%, rgba(108, 124, 255, 0.1), transparent 36%),
    #fff;
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .site-sidebar__support-visual {
  background: rgba(197, 236, 127, 0.28);
  border-color: rgba(108, 160, 48, 0.22);
  color: #2f4a12;
}

[data-theme="light"] .site-sidebar__support-title {
  color: #1a1a2e;
}

[data-theme="light"] .site-sidebar__support-btn {
  background: #c5ec7f;
  color: #1f2229;
}

[data-theme="light"] .site-sidebar__support-btn:hover {
  background: #d7f5a3;
}

html.site-sidebar-collapsed[data-theme="light"] .site-sidebar__support,
[data-theme="light"] html.site-sidebar-collapsed .site-sidebar__support {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] html.site-sidebar-collapsed .site-sidebar__support-visual {
  color: #2f4a12;
}

[data-theme="light"] .site-sidebar__promo {
  background: linear-gradient(180deg, rgba(108, 124, 255, 0.12) 0%, #fff 100%);
  border-color: rgba(108, 124, 255, 0.22);
}

.site-sidebar__promo-icon {
  display: inline-flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  color: #c5ec7f;
  font-size: 16px;
  transition: opacity 0.45s ease;
}

.site-sidebar__promo-label,
.site-sidebar__promo-title,
.site-sidebar__promo-btn {
  opacity: 1;
  overflow: hidden;
  transition: opacity 1.1s ease;
}

.site-sidebar__promo-label {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #c5ec7f;
  color: #1f2229;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-sidebar__promo-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.site-sidebar__promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  background: var(--accent-orange, #6c7cff);
  color: #111;
  font-size: 12px;
  font-weight: 700;
}

.site-sidebar__socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 auto;
  padding: 4px 0 2px;
  transition: gap var(--site-sidebar-anim);
}

.site-sidebar__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: rgba(226, 232, 240, 0.55);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  box-sizing: border-box;
  transform: translateY(0) scale(1);
  transition:
    color 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-sidebar__social svg {
  display: block;
}

[data-theme="light"] .site-sidebar__social {
  color: rgba(26, 26, 46, 0.55);
  background: rgba(15, 23, 42, 0.05);
}

.site-sidebar__social:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
  transform: translateY(-2px) scale(1.05);
}

.site-sidebar__social--telegram:hover {
  color: #fff;
  background: #229ed9;
}

.site-sidebar__social--youtube:hover {
  color: #fff;
  background: #ff0000;
}

.site-sidebar__social--rutube:hover {
  color: #fff;
  background:
    radial-gradient(circle 22px at calc(100% - 3px) 3px, #f0003c 0%, #e6192e 72%, transparent 73%),
    #0a0a2c;
}

.site-sidebar__social--vk:hover {
  color: #fff;
  background: #0077ff;
}

.site-sidebar__social--tiktok:hover {
  color: #fff;
  background: #010101;
  box-shadow:
    inset 0 0 0 1px rgba(37, 244, 238, 0.35),
    inset 0 0 0 1px rgba(254, 44, 85, 0.35);
}

.site-sidebar__collapse {
  position: absolute;
  top: 76px;
  right: 0;
  z-index: 1410;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: #1c1f26;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  line-height: 0;
  font-size: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
  transform: translate(50%, -50%);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] .site-sidebar__collapse {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.14);
  color: #1a1a2e;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.site-sidebar__collapse i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 14px;
  line-height: 1;
  transform: translateX(-0.5px);
  transition: transform var(--site-sidebar-anim);
}

.site-sidebar__collapse:hover {
  background: #2a2e38;
  color: #fff;
}

[data-theme="light"] .site-sidebar__collapse:hover {
  background: #f3f5f8;
  color: #1a1a2e;
}

.site-sidebar__collapse:focus-visible {
  outline: 2px solid var(--accent-orange, #6c7cff);
  outline-offset: 2px;
}

html.site-sidebar-collapsed .site-sidebar {
  width: 72px;
}

html.site-sidebar-collapsed body.has-site-sidebar {
  padding-left: 72px;
}

html.site-sidebar-collapsed .site-sidebar__inner {
  padding: 20px 10px 16px;
  align-items: stretch;
}

html.site-sidebar-collapsed .site-sidebar__brand {
  margin: 0 -10px 14px;
  padding: 0 10px 14px;
}

html.site-sidebar-collapsed .site-sidebar__logo {
  justify-content: center;
  margin: 0;
  gap: 0;
}

html.site-sidebar-collapsed .site-sidebar__logo-text,
html.site-sidebar-collapsed .site-sidebar__link-text {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

html.site-sidebar-collapsed .site-sidebar__section {
  opacity: 0;
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

html.site-sidebar-collapsed .site-sidebar__promo-label,
html.site-sidebar-collapsed .site-sidebar__promo-title,
html.site-sidebar-collapsed .site-sidebar__promo-btn,
html.site-sidebar-collapsed .site-sidebar__support-title,
html.site-sidebar-collapsed .site-sidebar__support-btn,
html.site-sidebar-collapsed .site-sidebar__support-visual-glow {
  display: none !important;
}

html.site-sidebar-collapsed .site-sidebar__support {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding: 0;
  margin: 0 auto;
  border-radius: 12px;
  gap: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

html.site-sidebar-collapsed .site-sidebar__support-visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  font-size: 16px;
  color: #c5ec7f;
  opacity: 1;
}

html.site-sidebar-collapsed .site-sidebar__nav {
  padding-right: 0;
  align-items: center;
}

html.site-sidebar-collapsed .site-sidebar__link {
  justify-content: center;
  width: 100%;
  padding: 8px 0;
  gap: 0;
}

html.site-sidebar-collapsed .site-sidebar__badge {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

html.site-sidebar-collapsed .site-sidebar__badge--muted,
html.site-sidebar-collapsed .site-sidebar__badge--live {
  display: none;
}

html.site-sidebar-collapsed .site-sidebar__footer {
  align-items: center;
}

html.site-sidebar-collapsed .site-sidebar__promo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0 auto;
}

html.site-sidebar-collapsed .site-sidebar__promo-icon {
  opacity: 1;
}

html.site-sidebar-collapsed .site-sidebar__socials {
  flex-direction: column;
  gap: 6px;
}

html.site-sidebar-collapsed .site-sidebar__collapse i {
  transform: rotate(180deg) translateX(-0.5px);
}

body.has-site-sidebar .cookie-consent {
  left: calc(50% + (var(--site-sidebar-width) / 2));
  transition: left var(--site-sidebar-anim);
}

@media (min-width: 1441px) {
  body.has-site-sidebar .header-menu-wrapper .header-burger-wrapper,
  body.has-site-sidebar .header-menu-wrapper .header-menu-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (min-width: 1101px) {
  body.has-site-sidebar .header-logo--sidebar-fallback {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  :root {
    --site-sidebar-width: 0px;
  }

  html.site-sidebar-collapsed {
    --site-sidebar-width: 0px;
  }

  body.has-site-sidebar,
  html.site-sidebar-collapsed body.has-site-sidebar {
    padding-left: 0 !important;
  }

  .site-sidebar {
    display: none !important;
  }

  body.has-site-sidebar .header-logo--sidebar-fallback {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    height: 42px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
  }

  body.has-site-sidebar .header-logo--sidebar-fallback picture {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    line-height: 0;
  }

  body.has-site-sidebar .header-logo--sidebar-fallback .header-logo-img {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
  }

  body.has-site-sidebar .header-logo--sidebar-fallback .header-logo-text {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
  }

  body.has-site-sidebar .header-inner {
    justify-content: space-between;
    gap: 12px;
  }

  body.has-site-sidebar .header-menu-wrapper {
    margin-left: auto;
  }

  body.has-site-sidebar .cookie-consent {
    left: 50%;
  }
}

/* Компактная поддержка на узких экранах (сайдбар ещё виден до 1100) */
@media (max-width: 1280px) and (min-width: 1101px) {
  .site-sidebar__support {
    gap: 6px;
    padding: 12px 10px 10px;
    border-radius: 14px;
  }

  .site-sidebar__support-visual {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 16px;
  }

  .site-sidebar__support-title {
    font-size: 13px;
  }

  .site-sidebar__support-btn {
    min-height: 34px;
    font-size: 12px;
    border-radius: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-sidebar__support-pulse::before,
  .site-sidebar__support-pulse::after,
  .site-sidebar__support-pulse-dot {
    animation: none;
  }
}
