/* ==========================================================================
   ГДЗ Орбита — основной стиylesheet
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #05060b;
  --bg-soft: #090b14;
  --bg-elevated: #0d1020;
  --surface: rgba(17, 21, 38, 0.66);
  --surface-strong: rgba(20, 25, 46, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --border: rgba(151, 166, 207, 0.16);
  --border-strong: rgba(168, 182, 222, 0.3);
  --text: #f4f7ff;
  --muted: #a8b2cc;
  --muted-2: #7f89a6;
  --violet: #8d70ff;
  --violet-2: #6b4cff;
  --violet-soft: rgba(141, 112, 255, 0.14);
  --cyan: #5ee7ff;
  --cyan-soft: rgba(94, 231, 255, 0.12);
  --lime: #c8ff6a;
  --lime-soft: rgba(200, 255, 106, 0.11);
  --orange: #ffb86b;
  --orange-soft: rgba(255, 184, 107, 0.12);
  --danger: #ff7f92;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.24);
  --radius: 26px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Unbounded", "Manrope", "Segoe UI", sans-serif;
  --header-h: 82px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --star: rgba(255, 255, 255, 0.86);
  --star-soft: rgba(190, 205, 255, 0.45);
  --grid-line: rgba(255, 255, 255, 0.035);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1ea;
  --bg-soft: #ece7dc;
  --bg-elevated: #fffdf8;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(34, 26, 72, 0.035);
  --border: rgba(36, 29, 74, 0.13);
  --border-strong: rgba(36, 29, 74, 0.24);
  --text: #17142a;
  --muted: #5d5876;
  --muted-2: #7b7592;
  --violet: #5b3df5;
  --violet-2: #4a2bd6;
  --violet-soft: rgba(91, 61, 245, 0.1);
  --cyan: #007f99;
  --cyan-soft: rgba(0, 127, 153, 0.1);
  --lime: #4d7a00;
  --lime-soft: rgba(77, 122, 0, 0.09);
  --orange: #b86412;
  --orange-soft: rgba(184, 100, 18, 0.1);
  --danger: #c02c45;
  --shadow: 0 28px 80px rgba(48, 35, 95, 0.14);
  --shadow-soft: 0 14px 40px rgba(48, 35, 95, 0.09);
  --star: rgba(63, 49, 120, 0.32);
  --star-soft: rgba(91, 61, 245, 0.18);
  --grid-line: rgba(36, 29, 74, 0.05);
}

/* ------------------------------ База ------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: color 0.3s ease;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

main,
.site-footer,
.site-header {
  position: relative;
  z-index: 1;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(141, 112, 255, 0.4);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 300;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--lime);
  color: #080a12;
  font-weight: 800;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.container--narrow {
  width: min(820px, calc(100% - 48px));
}

.section {
  padding: 92px 0;
}

.section--tight {
  padding: 42px 0;
}

.section--subjects {
  padding-top: 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow--live {
  padding: 8px 13px;
  border: 1px solid rgba(200, 255, 106, 0.24);
  border-radius: 999px;
  background: rgba(200, 255, 106, 0.055);
  letter-spacing: 0.12em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(200, 255, 106, 0.6);
  animation: livePulse 2.4s infinite;
}

.grad-text {
  background: linear-gradient(115deg, var(--lime) 0%, var(--cyan) 46%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 38px;
}

.section-head h2 {
  margin-top: 10px;
  font-family: var(--font-head);
  font-size: clamp(1.65rem, 3.2vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.section-head__lead {
  max-width: 620px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
}

.section-head__action {
  flex: 0 0 auto;
  padding-bottom: 4px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.text-link .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meta-item .icon {
  color: var(--muted-2);
  width: 14px;
  height: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill--small {
  padding: 4px 8px;
  font-size: 9px;
}

.pill__icon {
  width: 12px;
  height: 12px;
}

.pill--violet {
  border-color: rgba(141, 112, 255, 0.28);
  background: var(--violet-soft);
  color: #c5b6ff;
}

.pill--cyan {
  border-color: rgba(94, 231, 255, 0.24);
  background: var(--cyan-soft);
  color: #a9f4ff;
}

.pill--lime {
  border-color: rgba(200, 255, 106, 0.24);
  background: var(--lime-soft);
  color: #ddffa8;
}

.pill--grade {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

[data-theme="light"] .pill--violet {
  color: var(--violet);
}

[data-theme="light"] .pill--cyan {
  color: var(--cyan);
}

[data-theme="light"] .pill--lime {
  color: var(--lime);
}

.difficulty {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.difficulty__dots {
  display: inline-flex;
  gap: 3px;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}

.dot.is-on {
  background: var(--lime);
  box-shadow: 0 0 6px rgba(200, 255, 106, 0.45);
}

.difficulty__label {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* --------------------------- Кнопки ------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-2) 100%);
  color: #fff;
  box-shadow: 0 12px 32px rgba(107, 76, 255, 0.34);
}

.btn-primary:hover {
  box-shadow: 0 18px 42px rgba(107, 76, 255, 0.46);
}

.btn-lime {
  background: var(--lime);
  color: #080a12;
  box-shadow: 0 10px 28px rgba(200, 255, 106, 0.18);
}

.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.btn-small {
  min-height: 40px;
  padding: 9px 15px;
  font-size: 12px;
}

.btn-small .icon {
  width: 14px;
  height: 14px;
}

/* --------------------------- Фон и планеты ------------------------------ */

.space {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 72% 18%, rgba(141, 112, 255, 0.13), transparent 60%),
    radial-gradient(ellipse 70% 55% at 18% 78%, rgba(94, 231, 255, 0.08), transparent 62%),
    var(--bg);
  transition: background 0.4s ease;
}

.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.space__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
}

.space__glow--violet {
  width: 44vw;
  height: 44vw;
  top: -16vw;
  left: -12vw;
  background: rgba(107, 76, 255, 0.26);
}

.space__glow--orange {
  width: 38vw;
  height: 38vw;
  right: -14vw;
  top: 4vh;
  background: rgba(255, 138, 64, 0.16);
}

[data-theme="light"] .space {
  background:
    radial-gradient(ellipse 80% 60% at 72% 18%, rgba(141, 112, 255, 0.13), transparent 60%),
    radial-gradient(ellipse 70% 55% at 18% 78%, rgba(94, 231, 255, 0.1), transparent 62%),
    var(--bg);
}

[data-theme="light"] .space__glow {
  opacity: 0.32;
}

[data-theme="light"] .starfield {
  opacity: 0.55;
}

.orbital-lines {
  position: absolute;
  inset: 0;
}

.orbital-line {
  position: absolute;
  border: 1px solid var(--grid-line);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.orbital-line--1 {
  width: 78vw;
  height: 34vw;
  top: 8vh;
  right: -20vw;
}

.orbital-line--2 {
  width: 58vw;
  height: 24vw;
  top: 20vh;
  right: -10vw;
}

.orbital-line--3 {
  width: 42vw;
  height: 16vw;
  bottom: 12vh;
  left: -12vw;
  transform: rotate(18deg);
}

.planet {
  position: absolute;
  will-change: transform;
  transition: transform 0.6s var(--ease);
}

.planet img {
  width: 100%;
  height: auto;
  filter: saturate(1.04);
}

.planet--jupiter {
  top: -18vw;
  right: -20vw;
  width: min(76vw, 1120px);
  opacity: 0.82;
}

.planet--jupiter img {
  animation: planetFloat 20s ease-in-out infinite;
}

.planet--moon {
  left: -5vw;
  bottom: -9vh;
  width: min(21vw, 310px);
  opacity: 0.48;
}

.planet--moon img {
  animation: planetFloat 15s ease-in-out infinite reverse;
}

[data-theme="light"] .planet--jupiter {
  opacity: 0.66;
}

[data-theme="light"] .planet--moon {
  opacity: 0.52;
}

/* Там, где поверх планеты идёт длинный текст, приглушаем Юпитер. */
.page-privacy .planet--jupiter,
.page-error .planet--jupiter {
  opacity: 0.45;
}

.page-about .planet--jupiter {
  opacity: 0.58;
}

[data-theme="light"] .page-privacy .planet--jupiter,
[data-theme="light"] .page-error .planet--jupiter {
  opacity: 0.34;
}

/* --------------------------- Шапка -------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled::before {
  border-color: var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

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

.logo__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(141, 112, 255, 0.24), rgba(94, 231, 255, 0.06));
  color: var(--lime);
  box-shadow: inset 0 0 20px rgba(141, 112, 255, 0.14);
}

.logo__mark .icon {
  width: 25px;
  height: 25px;
}

.logo__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo__line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.logo__gdz {
  color: var(--lime);
}

.logo__orbita {
  color: var(--text);
}

.logo__tag {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.logo--footer {
  margin-bottom: 18px;
}

.logo--footer .logo__mark {
  width: 38px;
  height: 38px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav__drop {
  position: relative;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav__link:hover,
.nav__link.is-active,
.nav__drop:focus-within > .nav__link,
.nav__drop.is-open > .nav__link {
  background: var(--surface-soft);
  color: var(--text);
}

.nav__chevron {
  width: 13px;
  height: 13px;
  transition: transform 0.25s ease;
}

.nav__drop.is-open .nav__chevron {
  transform: rotate(180deg);
}

.nav__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 340px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.985);
  transform-origin: top left;
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s var(--ease);
}

.nav__drop:hover > .nav__panel,
.nav__drop:focus-within > .nav__panel,
.nav__drop.is-open > .nav__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav__panel--subjects {
  width: 310px;
}

.nav__panel-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.drop-grid {
  display: grid;
  gap: 3px;
}

.drop-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 13px;
  transition: background 0.2s ease;
}

.drop-link:hover {
  background: var(--surface-soft);
}

.drop-link__num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--violet);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
}

.drop-link__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
}

.drop-link__icon--violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.drop-link__icon--cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.drop-link__icon--lime {
  background: var(--lime-soft);
  color: var(--lime);
}

.drop-link__text {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.drop-link__text strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.drop-link__text small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-link__arrow {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.drop-link:hover .drop-link__arrow {
  opacity: 1;
  transform: translateX(2px);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.search-trigger:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.search-trigger .icon {
  width: 15px;
  height: 15px;
}

.search-trigger kbd {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted-2);
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 800;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
  transform: rotate(8deg);
}

.theme-toggle .icon {
  width: 17px;
  height: 17px;
}

.theme-toggle__light {
  display: none;
}

[data-theme="light"] .theme-toggle__dark {
  display: none;
}

[data-theme="light"] .theme-toggle__light {
  display: block;
}

.header__tg {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 11px;
}

.burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 11px 9px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-soft);
}

.burger span {
  display: block;
  width: 100%;
  height: 1.5px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* --------------------------- Мобильное меню ----------------------------- */

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 45;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s var(--ease);
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: 28px;
  padding-bottom: 40px;
}

.mobile-menu__group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu__grades {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.mobile-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 13px 4px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.mobile-grade span {
  color: var(--violet);
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.mobile-menu__subjects {
  display: grid;
  gap: 6px;
}

.mobile-subject {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.mobile-subject .icon {
  color: var(--lime);
  width: 18px;
  height: 18px;
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.mobile-menu__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mobile-menu__links .icon {
  width: 15px;
  height: 15px;
}

.mobile-menu__search {
  width: 100%;
}

/* --------------------------- Герой -------------------------------------- */

.hero {
  position: relative;
  display: flex;
  min-height: min(940px, 100svh);
  align-items: center;
  padding: calc(var(--header-h) + 64px) 0 80px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 48px;
}

.hero__copy {
  max-width: 700px;
}

.hero h1 {
  margin-top: 20px;
  font-family: var(--font-head);
  font-size: clamp(2.45rem, 5.4vw, 4.7rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero__lead {
  max-width: 560px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero__stats div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.hero__stats dt {
  font-family: var(--font-head);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero__stats dd {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.orbital-card {
  position: relative;
  display: grid;
  width: min(430px, 34vw);
  min-width: 320px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(141, 112, 255, 0.22), transparent 42%),
    radial-gradient(circle at 68% 74%, rgba(94, 231, 255, 0.1), transparent 45%),
    rgba(8, 10, 20, 0.38);
  box-shadow: inset 0 0 90px rgba(141, 112, 255, 0.16), var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="light"] .orbital-card {
  background:
    radial-gradient(circle at 32% 26%, rgba(141, 112, 255, 0.18), transparent 42%),
    radial-gradient(circle at 68% 74%, rgba(94, 231, 255, 0.12), transparent 45%),
    rgba(255, 255, 255, 0.38);
}

.orbital-card__ring {
  position: absolute;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
  animation: ringSpin 40s linear infinite;
}

.orbital-card__ring--1 {
  inset: 9%;
  opacity: 0.65;
}

.orbital-card__ring--2 {
  inset: 22%;
  border-style: solid;
  border-color: rgba(141, 112, 255, 0.25);
  animation-direction: reverse;
  animation-duration: 30s;
}

.orbital-card__ring--3 {
  inset: 35%;
  border-color: rgba(200, 255, 106, 0.22);
  animation-duration: 22s;
}

.orbital-card__center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 42%;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-strong);
  box-shadow: 0 0 50px rgba(141, 112, 255, 0.24), inset 0 0 30px rgba(141, 112, 255, 0.08);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}

.orbital-card__center:hover {
  transform: scale(1.04);
  box-shadow: 0 0 70px rgba(141, 112, 255, 0.36), inset 0 0 30px rgba(141, 112, 255, 0.12);
}

.orbital-card__num {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.orbital-card__label {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.orbital-card__hint {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--lime);
  animation: hintBob 2.2s ease-in-out infinite;
}

.orbital-card__hint .icon {
  width: 12px;
  height: 12px;
}

.orbital-chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: transform 0.25s var(--ease), border-color 0.25s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.orbital-chip:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--border-strong);
}

.orbital-chip .icon {
  width: 13px;
  height: 13px;
}

.orbital-chip--ru {
  top: 8%;
  left: 50%;
  color: #c5b6ff;
  transform: translateX(-50%);
}

.orbital-chip--ru:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.03);
}

.orbital-chip--chem {
  right: 0;
  bottom: 22%;
  color: #a9f4ff;
}

.orbital-chip--bio {
  left: 0;
  bottom: 22%;
  color: #ddffa8;
}

.orbital-card__caption {
  position: absolute;
  bottom: 12%;
  left: 50%;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted-2);
  transform: translateX(-50%);
  animation: hintBob 2.4s ease-in-out infinite;
}

.hero__scroll .icon {
  width: 15px;
  height: 15px;
}

/* --------------------------- Сетки карточек ----------------------------- */

.grade-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.grade-grid--subject {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.grade-card {
  position: relative;
  display: flex;
  min-height: 248px;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}

.grade-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 0%, rgba(141, 112, 255, 0.22), transparent 58%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.grade-card:hover {
  transform: translateY(-5px);
  border-color: rgba(141, 112, 255, 0.38);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.grade-card:hover::before {
  opacity: 1;
}

.grade-card > * {
  position: relative;
  z-index: 1;
}

.grade-card__head {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.grade-card__num {
  background: linear-gradient(180deg, var(--text) 10%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-head);
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.grade-card__label {
  padding-bottom: 7px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.grade-card h3 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.grade-card__subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}

.grade-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
}

.grade-card__foot .icon {
  width: 15px;
  height: 15px;
  color: var(--violet);
  transition: transform 0.25s ease;
}

.grade-card:hover .grade-card__foot .icon {
  transform: translate(2px, -2px);
}

.grade-card--compact {
  min-height: 180px;
}

.grade-card--compact .grade-card__num {
  font-size: 42px;
}

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

.subject-card {
  --accent: var(--violet);
  --accent-soft: var(--violet-soft);
  position: relative;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}

.subject-card::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--accent-soft);
  filter: blur(30px);
  transition: opacity 0.3s ease;
}

.subject-card--violet {
  --accent: var(--violet);
  --accent-soft: var(--violet-soft);
}

.subject-card--cyan {
  --accent: var(--cyan);
  --accent-soft: var(--cyan-soft);
}

.subject-card--lime {
  --accent: var(--lime);
  --accent-soft: var(--lime-soft);
}

.subject-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.subject-card > * {
  position: relative;
  z-index: 1;
}

.subject-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}

.subject-card__icon .icon {
  width: 25px;
  height: 25px;
}

.subject-card__count {
  position: absolute;
  top: 30px;
  right: 28px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subject-card h3 {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.subject-card p {
  max-width: 310px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.subject-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.subject-card__foot .icon {
  width: 17px;
  height: 17px;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.subject-card:hover .subject-card__foot .icon {
  transform: translate(2px, -2px);
}

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

.task-card {
  --accent: var(--violet);
  display: flex;
  min-height: 260px;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}

.task-card--violet {
  --accent: var(--violet);
}

.task-card--cyan {
  --accent: var(--cyan);
}

.task-card--lime {
  --accent: var(--lime);
}

.task-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

.task-card__top {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.task-card h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.task-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.task-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.task-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.task-card__time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
}

.task-card__time .icon {
  width: 12px;
  height: 12px;
}

.task-card__arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  transition: background 0.25s ease, transform 0.25s ease;
}

.task-card__arrow .icon {
  width: 14px;
  height: 14px;
}

.task-card:hover .task-card__arrow {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  transform: translate(2px, -2px);
}

/* --------------------------- Как это работает --------------------------- */

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

.how-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.how-card__num {
  position: absolute;
  top: 18px;
  right: 22px;
  color: var(--border-strong);
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.how-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  border: 1px solid rgba(200, 255, 106, 0.22);
  border-radius: 14px;
  background: var(--lime-soft);
  color: var(--lime);
}

.how-card__icon .icon {
  width: 22px;
  height: 22px;
}

.how-card h3 {
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.how-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

/* --------------------------- Бенто -------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.bento__item {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bento__item--wide {
  grid-column: span 2;
  background:
    radial-gradient(circle at 86% 10%, rgba(141, 112, 255, 0.18), transparent 55%),
    var(--surface);
}

.bento__item:nth-last-child(-n + 2) {
  grid-column: span 2;
}

.bento__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--lime);
}

.bento__icon .icon {
  width: 18px;
  height: 18px;
}

.bento__item h3 {
  margin-top: 14px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bento__item p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.bento__tag {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 9px;
  border: 1px solid rgba(200, 255, 106, 0.22);
  border-radius: 999px;
  color: var(--lime);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* --------------------------- CTA ---------------------------------------- */

.cta-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  overflow: hidden;
  padding: 44px;
  border: 1px solid rgba(141, 112, 255, 0.28);
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 10%, rgba(141, 112, 255, 0.24), transparent 45%),
    radial-gradient(circle at 88% 90%, rgba(94, 231, 255, 0.12), transparent 45%),
    var(--surface-strong);
  box-shadow: var(--shadow);
}

.cta-panel::before {
  content: "";
  position: absolute;
  top: -80px;
  right: 12%;
  width: 220px;
  height: 220px;
  border: 1px dashed rgba(200, 255, 106, 0.18);
  border-radius: 50%;
}

.cta-panel__copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.cta-panel h2 {
  margin-top: 10px;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.cta-panel p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.cta-panel__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  flex: 0 0 auto;
}

/* --------------------------- Страницы ----------------------------------- */

.breadcrumbs {
  padding-top: calc(var(--header-h) + 24px);
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: var(--border-strong);
}

.breadcrumbs a:hover {
  color: var(--text);
}

.breadcrumbs [aria-current="page"] {
  color: var(--muted);
}

.page-hero {
  position: relative;
  padding: 26px 0 46px;
}

.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  align-items: center;
  gap: 48px;
}

.page-hero h1 {
  margin-top: 16px;
  font-family: var(--font-head);
  font-size: clamp(2.1rem, 4.8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.page-hero__lead {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.7;
}

.page-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat-pill .icon {
  width: 13px;
  height: 13px;
  color: var(--lime);
}

.page-hero--hub {
  padding-bottom: 26px;
}

.page-hero--hub h1 {
  max-width: 1000px;
}

.page-hero--text {
  padding-bottom: 20px;
}

.page-meta {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-badge {
  position: relative;
  display: flex;
  width: 210px;
  height: 210px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(141, 112, 255, 0.2), transparent 50%), var(--surface);
  box-shadow: inset 0 0 50px rgba(141, 112, 255, 0.12), var(--shadow-soft);
}

.hero-badge::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
  animation: ringSpin 34s linear infinite;
}

.hero-badge__num {
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
}

.hero-badge__text {
  position: relative;
  z-index: 1;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-badge__caption {
  position: relative;
  z-index: 1;
  max-width: 130px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.subject-hero-icon {
  display: flex;
  width: 210px;
  height: 210px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 44px;
  background: var(--surface);
  box-shadow: inset 0 0 60px rgba(141, 112, 255, 0.12), var(--shadow-soft);
}

.subject-hero-icon--violet {
  color: var(--violet);
  background: radial-gradient(circle at 30% 20%, var(--violet-soft), transparent 60%), var(--surface);
}

.subject-hero-icon--cyan {
  color: var(--cyan);
  background: radial-gradient(circle at 30% 20%, var(--cyan-soft), transparent 60%), var(--surface);
}

.subject-hero-icon--lime {
  color: var(--lime);
  background: radial-gradient(circle at 30% 20%, var(--lime-soft), transparent 60%), var(--surface);
}

.subject-hero-icon .icon {
  width: 64px;
  height: 64px;
}

.subject-hero-icon span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.hub-card {
  --accent: var(--violet);
  position: relative;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}

.hub-card--violet {
  --accent: var(--violet);
}

.hub-card--cyan {
  --accent: var(--cyan);
}

.hub-card--lime {
  --accent: var(--lime);
}

.hub-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.hub-card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.hub-card__icon .icon {
  width: 20px;
  height: 20px;
}

.hub-card__grade {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hub-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hub-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
}

.hub-card__foot .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.hub-block {
  margin-bottom: 34px;
}

.hub-block:last-child {
  margin-bottom: 0;
}

.hub-block__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.hub-block__title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.hub-block__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.hub-block__icon--violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.hub-block__icon--cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.hub-block__icon--lime {
  background: var(--lime-soft);
  color: var(--lime);
}

.hub-block__icon .icon {
  width: 21px;
  height: 21px;
}

.hub-block__title h2 {
  margin-top: 2px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.task-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.task-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto 34px;
  gap: 16px;
  align-items: center;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row:hover {
  background: var(--surface-soft);
}

.task-row__topic {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.4;
  text-transform: uppercase;
}

.task-row--violet .task-row__topic {
  color: var(--violet);
}

.task-row--cyan .task-row__topic {
  color: var(--cyan);
}

.task-row--lime .task-row__topic {
  color: var(--lime);
}

.task-row__title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.task-row__meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.task-row__time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
}

.task-row__time .icon {
  width: 12px;
  height: 12px;
}

.task-row__arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted-2);
  transition: transform 0.2s ease, color 0.2s ease;
}

.task-row__arrow .icon {
  width: 13px;
  height: 13px;
}

.task-row:hover .task-row__arrow {
  color: var(--lime);
  transform: translateX(2px);
}

.tips-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tips-panel h2 {
  margin-top: 8px;
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.tips-list {
  display: grid;
  gap: 12px;
  counter-reset: tips;
}

.tips-list li {
  position: relative;
  padding-left: 36px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  counter-increment: tips;
}

.tips-list li::before {
  content: counter(tips, decimal-leading-zero);
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--violet);
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
}

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.topic-chip {
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.topic-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.subject-grades {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.subject-grade-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.subject-grade-block__grade {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subject-grade-block__head span {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
}

.grade-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}

.grade-switcher__label {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.grade-switcher__links {
  display: flex;
  gap: 5px;
}

.grade-switcher__link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.grade-switcher__link:hover,
.grade-switcher__link.is-current {
  border-color: var(--violet);
  background: var(--violet);
  color: #fff;
}

/* --------------------------- Задание ------------------------------------ */

.task-page {
  padding-top: 26px;
}

.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 42px;
  align-items: start;
}

.task-article {
  min-width: 0;
}

.task-header {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.task-header h1 {
  max-width: 820px;
  margin-top: 14px;
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.8vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.task-header__lead {
  max-width: 720px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.task-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
}

.task-section {
  padding-top: 34px;
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.task-section__head {
  margin-bottom: 18px;
}

.task-section__head h2 {
  margin-top: 6px;
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.task-statement {
  position: relative;
  overflow: hidden;
  padding: 26px 28px 26px 32px;
  border: 1px solid rgba(141, 112, 255, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(141, 112, 255, 0.11), rgba(94, 231, 255, 0.035)),
    var(--surface);
}

.task-statement::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(var(--violet), var(--cyan));
}

.task-statement .eyebrow {
  margin-bottom: 8px;
}

.task-words {
  color: var(--text) !important;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.8;
}

.prose {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.prose p {
  margin-bottom: 13px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--text);
  font-weight: 800;
}

.prose em {
  color: var(--text);
  font-style: italic;
}

.prose u {
  text-decoration-color: var(--lime);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding-left: 20px;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 6px;
}

.prose a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose .eq {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.95em;
  white-space: nowrap;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 17px;
}

.step::before {
  content: "";
  position: absolute;
  top: 46px;
  bottom: -20px;
  left: 21px;
  width: 1px;
  background: linear-gradient(var(--border-strong), transparent);
}

.step:last-child::before {
  display: none;
}

.step__num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--lime);
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
}

.step__body {
  padding-top: 2px;
}

.step__body h3 {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.steps--compact {
  gap: 16px;
}

.steps--compact .step {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 13px;
}

.steps--compact .step__num {
  width: 36px;
  height: 36px;
  font-size: 9px;
}

.steps--compact .step::before {
  top: 38px;
  left: 17px;
  bottom: -16px;
}

.steps--compact .step__body h3 {
  font-size: 13px;
}

.steps--compact .step__body p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.rule-card {
  padding: 28px;
  border: 1px solid rgba(200, 255, 106, 0.26);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(200, 255, 106, 0.07), rgba(200, 255, 106, 0.015)),
    var(--surface);
}

.rule-card__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.rule-card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(200, 255, 106, 0.24);
  border-radius: 12px;
  background: var(--lime-soft);
  color: var(--lime);
}

.rule-card__icon .icon {
  width: 20px;
  height: 20px;
}

.rule-card h2 {
  margin-top: 3px;
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.answer-card {
  overflow: hidden;
  border: 1px solid rgba(94, 231, 255, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(94, 231, 255, 0.07), rgba(141, 112, 255, 0.04)),
    var(--surface);
}

.answer-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px;
}

.answer-card__head h2 {
  margin-top: 4px;
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.answer-card__body {
  padding: 0 26px 26px;
  animation: answerIn 0.35s var(--ease);
}

.answer-card__body .prose {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.check-item[open] {
  border-color: rgba(200, 255, 106, 0.24);
  background: var(--surface-strong);
}

.check-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

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

.check-item__plus {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted-2);
  transition: transform 0.25s ease, color 0.25s ease;
}

.check-item__plus .icon {
  width: 13px;
  height: 13px;
}

.check-item[open] .check-item__plus {
  color: var(--lime);
  transform: rotate(180deg);
}

.check-item .prose {
  padding: 0 18px 16px;
  font-size: 13px;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 26px;
}

.prevnext__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.prevnext__link:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.prevnext__link--next {
  justify-content: flex-end;
  text-align: right;
}

.prevnext__link .icon {
  width: 17px;
  height: 17px;
  color: var(--muted-2);
}

.prevnext__link span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.prevnext__link small {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prevnext__link strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toc__title {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.toc ol {
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--violet);
  font-family: var(--font-head);
  font-size: 8px;
  font-weight: 700;
}

.toc a:hover {
  color: var(--text);
}

.side-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.side-card__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--lime);
}

.side-card__icon .icon {
  width: 15px;
  height: 15px;
}

/* На странице задания планета проходит за правой колонкой — усиливаем фон,
   чтобы текст оставался читаемым на ярких полосах Юпитера. */
.page-task .toc,
.page-task .side-card {
  background: var(--surface-strong);
}

.side-card h3 {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
}

.side-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.side-card--report {
  border-color: rgba(255, 184, 107, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 184, 107, 0.06), transparent),
    var(--surface);
}

.side-card--report .side-card__icon {
  color: var(--orange);
}

.side-card--tg .side-card__icon {
  color: var(--cyan);
}

.side-related {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.side-related:last-child {
  border-bottom: 0;
}

.side-related .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: var(--muted-2);
}

.side-related:hover {
  color: var(--text);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), var(--cyan), var(--violet));
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}

.page-task .reading-progress {
  opacity: 1;
}

/* --------------------------- О проекте ---------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.about-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.about-card__num {
  display: block;
  margin-bottom: 26px;
  color: var(--violet);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
}

.about-card h2 {
  margin-bottom: 10px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.about-orbit {
  position: relative;
  display: flex;
  width: 220px;
  height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(141, 112, 255, 0.2), transparent 55%), var(--surface);
  box-shadow: var(--shadow-soft);
}

.about-orbit__ring {
  position: absolute;
  inset: 15%;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
  animation: ringSpin 32s linear infinite;
}

.about-orbit__planet {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(200, 255, 106, 0.24);
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--lime);
}

.about-orbit__planet .icon {
  width: 28px;
  height: 28px;
}

.about-orbit__label {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

.disclaimer {
  display: flex;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 184, 107, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 184, 107, 0.07), transparent),
    var(--surface);
}

.disclaimer__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 184, 107, 0.24);
  border-radius: 12px;
  background: var(--orange-soft);
  color: var(--orange);
}

.disclaimer__icon .icon {
  width: 20px;
  height: 20px;
}

.disclaimer h2 {
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.disclaimer p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.prose--page {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-strong);
  font-size: 15px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.prose--page h2 {
  margin: 32px 0 10px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prose--page h2:first-child {
  margin-top: 0;
}

.prose--page p {
  margin-bottom: 12px;
}

.note-card {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  padding: 18px;
  border: 1px solid rgba(94, 231, 255, 0.2);
  border-radius: 16px;
  background: var(--cyan-soft);
}

.note-card > span {
  color: var(--cyan);
}

.note-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* --------------------------- 404 ---------------------------------------- */

.error-page {
  display: flex;
  min-height: 100svh;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
}

.error-page__inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 48px;
}

.error-page__visual {
  position: relative;
  display: grid;
  width: min(380px, 80vw);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(141, 112, 255, 0.18), transparent 55%), var(--surface);
}

.error-page__code {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, var(--text), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-head);
  font-size: clamp(70px, 12vw, 120px);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
}

.error-page__orbit {
  position: absolute;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
  animation: ringSpin 28s linear infinite;
}

.error-page__orbit--1 {
  inset: 8%;
}

.error-page__orbit--2 {
  inset: 22%;
  animation-direction: reverse;
  animation-duration: 20s;
}

.error-page__planet {
  position: absolute;
  right: 12%;
  bottom: 18%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lime);
  color: #080a12;
  box-shadow: 0 0 30px rgba(200, 255, 106, 0.35);
}

.error-page__planet .icon {
  width: 22px;
  height: 22px;
}

.error-page h1 {
  margin-top: 14px;
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.error-page__copy > p {
  max-width: 520px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.error-page__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.error-page__links a {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.error-page__links a:hover {
  color: var(--lime);
}

/* --------------------------- Подвал ------------------------------------- */

.site-footer {
  padding: 66px 0 28px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.22));
}

[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, transparent, rgba(80, 60, 120, 0.04));
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer__brand p {
  max-width: 330px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.footer__tg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
}

.footer__tg .icon {
  width: 15px;
  height: 15px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer__col h4 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer__col a,
.footer__link {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  transition: color 0.2s ease;
}

.footer__col a:hover,
.footer__link:hover {
  color: var(--lime);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.5;
}

.footer__made {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-align: right;
}

.footer__made .icon {
  width: 12px;
  height: 12px;
  color: var(--lime);
}

/* --------------------------- Модальные окна ----------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 9, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.2s ease;
}

.modal__panel {
  position: relative;
  width: min(620px, 100%);
  max-height: min(86vh, 820px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  animation: modalIn 0.28s var(--ease);
}

.modal__close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.modal__close:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.modal__close .icon {
  width: 15px;
  height: 15px;
}

.search-modal {
  place-items: start center;
  padding-top: 10vh;
}

.search-modal__panel {
  width: min(720px, 100%);
  padding: 0;
  overflow: hidden;
}

.search-modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.search-modal__icon {
  width: 20px;
  height: 20px;
  color: var(--lime);
}

.search-modal__head input {
  min-width: 0;
  flex: 1;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}

.search-modal__head input::placeholder {
  color: var(--muted-2);
}

.search-modal__hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.search-modal__hint-label {
  margin-right: 3px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-modal__hints button {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.search-modal__hints button:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.search-modal__results {
  min-height: 220px;
  max-height: min(52vh, 440px);
  overflow-y: auto;
  padding: 8px;
}

.search-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 11px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
}

.search-modal__foot kbd {
  display: inline-block;
  min-width: 16px;
  margin-right: 3px;
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 210px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.search-empty__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--violet);
}

.search-empty__icon .icon {
  width: 22px;
  height: 22px;
}

.search-empty p {
  max-width: 340px;
  font-size: 12px;
  line-height: 1.6;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 13px;
  transition: background 0.15s ease;
}

.search-result:hover,
.search-result.is-active {
  background: var(--surface-soft);
}

.search-result__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--lime);
}

.search-result__icon .icon {
  width: 16px;
  height: 16px;
}

.search-result__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.search-result__meta {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-result__title {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result__title mark {
  background: var(--lime-soft);
  color: var(--lime);
  border-radius: 3px;
  padding: 0 1px;
}

.search-result__arrow {
  color: var(--muted-2);
}

.search-result__arrow .icon {
  width: 14px;
  height: 14px;
}

.search-count {
  padding: 4px 12px 8px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
}

.report-modal__panel {
  width: min(580px, 100%);
}

.report-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.report-modal h2 {
  margin-top: 8px;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.report-modal__lead {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.field select,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  transition: border-color 0.2s ease;
}

.field select:focus,
.field textarea:focus {
  border-color: var(--violet);
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.report-form__page {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted-2);
  font-size: 9px;
}

.report-form__page strong {
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.report-form__note {
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 150;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s var(--ease);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* --------------------------- Анимации ----------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 255, 106, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(200, 255, 106, 0); }
}

@keyframes planetFloat {
  0%, 100% { transform: translateY(0) rotate(0.001deg); }
  50% { transform: translateY(-14px) rotate(0.4deg); }
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

@keyframes hintBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes answerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------- Адаптив ------------------------------------ */

@media (max-width: 1100px) {
  .grade-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grade-card {
    min-height: 220px;
  }

  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bento__item--wide {
    grid-column: span 2;
  }

  .bento__item:nth-last-child(-n + 2) {
    grid-column: auto;
  }

  .task-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
  }
}

@media (max-width: 960px) {
  :root {
    --header-h: 72px;
  }

  .nav,
  .search-trigger span,
  .search-trigger kbd,
  .header__tg span {
    display: none;
  }

  .search-trigger {
    width: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .header__tg {
    width: 40px;
    padding: 0;
    border-radius: 50%;
  }

  .header__tg .icon {
    width: 16px;
    height: 16px;
  }

  .burger {
    display: block;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 52px);
    padding-bottom: 56px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .hero__copy {
    max-width: 720px;
  }

  .hero__visual {
    justify-content: flex-start;
  }

  .orbital-card {
    width: min(380px, 70vw);
    min-width: 0;
  }

  .hero__scroll {
    display: none;
  }

  .page-hero__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .page-hero__aside {
    display: none;
  }

  .task-layout {
    grid-template-columns: 1fr;
  }

  .task-sidebar {
    position: static;
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc {
    grid-column: span 2;
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer__col:last-child {
    grid-column: span 3;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }

  .footer__col:last-child h4 {
    width: 100%;
  }

  .tips-panel {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .cta-panel {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
  }

  .error-page__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .error-page__visual {
    width: min(300px, 70vw);
  }

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

  .planet--jupiter {
    top: -10vw;
    right: -34vw;
    width: 90vw;
    opacity: 0.5;
  }

  .planet--moon {
    left: -6vw;
    bottom: 4vh;
    width: 28vw;
    opacity: 0.36;
  }
}

@media (max-width: 720px) {
  .container,
  .container--narrow {
    width: calc(100% - 36px);
  }

  .section {
    padding: 64px 0;
  }

  .section--tight {
    padding: 30px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 26px;
  }

  .section-head__action {
    padding-bottom: 0;
  }

  .grade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grade-card {
    min-height: 200px;
    padding: 18px;
  }

  .grade-card__num {
    font-size: 46px;
  }

  .subject-grid,
  .how-grid,
  .task-grid {
    grid-template-columns: 1fr;
  }

  .subject-card {
    min-height: 250px;
  }

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

  .bento__item--wide {
    grid-column: auto;
  }

  .bento__item:nth-last-child(-n + 2) {
    grid-column: auto;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 10vw, 3.4rem);
  }

  .hero__stats {
    gap: 12px 24px;
  }

  .hero__stats dt {
    font-size: 19px;
  }

  .orbital-card {
    width: min(320px, 78vw);
  }

  .orbital-chip {
    padding: 7px 9px;
    font-size: 8px;
  }

  .orbital-chip--chem {
    right: -2%;
  }

  .orbital-chip--bio {
    left: -2%;
  }

  .task-row {
    grid-template-columns: 1fr 32px;
    gap: 6px 12px;
    padding: 15px 16px;
  }

  .task-row__topic {
    grid-column: 1;
    font-size: 8px;
  }

  .task-row__title {
    grid-column: 1;
    font-size: 12px;
  }

  .task-row__meta {
    grid-column: 1;
    gap: 10px;
  }

  .task-row__arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .hub-block__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .task-sidebar {
    grid-template-columns: 1fr;
  }

  .toc {
    grid-column: auto;
  }

  .answer-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .answer-card__head .btn {
    width: 100%;
  }

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

  .prevnext__link--next {
    justify-content: flex-start;
    text-align: left;
  }

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

  .footer__brand {
    grid-column: span 2;
  }

  .footer__col:last-child {
    grid-column: span 2;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__made {
    text-align: left;
  }

  .grade-switcher {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cta-panel {
    padding: 26px;
  }

  .cta-panel__actions {
    width: 100%;
  }

  .cta-panel__actions .btn {
    flex: 1;
  }

  .disclaimer {
    flex-direction: column;
  }

  .modal {
    padding: 10px;
  }

  .search-modal {
    padding-top: 4vh;
  }

  .search-modal__head {
    padding: 14px;
  }

  .search-modal__head input {
    font-size: 14px;
  }

  .search-modal__hints {
    padding: 10px 14px;
  }

  .search-modal__foot {
    display: none;
  }

  .modal__panel {
    padding: 22px;
    border-radius: 22px;
  }

  .report-modal h2 {
    font-size: 22px;
  }

  .report-modal__close {
    top: 14px;
    right: 14px;
  }
}

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

  .grade-card {
    min-height: 170px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__visual {
    justify-content: center;
  }

  .orbital-card {
    width: min(280px, 82vw);
  }

  .orbital-chip--ru {
    top: 5%;
  }

  .orbital-chip--chem,
  .orbital-chip--bio {
    bottom: 18%;
  }

  .orbital-card__caption {
    display: none;
  }

  .page-hero__stats {
    gap: 6px;
  }

  .stat-pill {
    padding: 7px 10px;
    font-size: 9px;
  }

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

  .footer__brand,
  .footer__col:last-child {
    grid-column: auto;
  }

  .footer__col:last-child {
    border-top: 1px solid var(--border);
  }

  .error-page__actions .btn {
    width: 100%;
  }

  .topic-chip {
    font-size: 10px;
  }
}

/* --------------------------- Доступность -------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .planet {
    transition: none;
  }
}

@media print {
  .space,
  .site-header,
  .site-footer,
  .task-sidebar,
  .task-actions,
  .prevnext,
  .modal,
  .toast,
  .reading-progress {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .task-layout {
    display: block;
  }

  .answer-card__body[hidden] {
    display: block;
  }

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

  .breadcrumbs {
    padding-top: 0;
  }
}
