/* ============================================================
   Irina English — фирменный стиль
   Warm Editorial × Animated 3D × Modern Education
   ============================================================ */

:root {
  /* палитра */
  --bg: #0a0d0a;
  --bg-soft: #0f130f;
  --ink: #f2f5ec;
  --ink-soft: #b9c2b4;
  --ink-muted: #8a9486;
  --green-deep: #1e3a2e;
  --green: #7fb79a;
  --lime: #d5ff5b;
  --lime-deep: #bfe94a;
  --coral: #f0aa91;
  --coral-soft: rgba(240, 170, 145, 0.2);
  --surface: #141914;
  --line: rgba(242, 245, 236, 0.1);
  --line-strong: rgba(242, 245, 236, 0.2);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 26px 60px rgba(0, 0, 0, 0.55);
  --shadow-lime: 0 14px 44px rgba(213, 255, 91, 0.28);

  /* типографика */
  --font: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;

  /* сетка */
  --container: 1200px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --gutter: clamp(18px, 4vw, 40px);
  --section: clamp(64px, 9vw, 128px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 82% -10%, rgba(213, 255, 91, 0.16), transparent 60%),
    radial-gradient(48rem 34rem at -10% 30%, rgba(240, 170, 145, 0.13), transparent 65%),
    radial-gradient(40rem 30rem at 50% 110%, rgba(85, 121, 105, 0.12), transparent 70%);
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li + li { margin-top: 0.35em; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 1.7vw, 1.5rem); line-height: 1.2; }
h4 { font-size: 1.08rem; line-height: 1.3; }

::selection { background: var(--lime); color: #0b0f0a; }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-wide { max-width: 1360px; }

.section { padding-block: var(--section); position: relative; }
.section-tight { padding-block: clamp(40px, 6vw, 76px); }

/* ---------- типографические акценты ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--lime-deep);
  border-radius: 2px;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}

.text-muted { color: var(--ink-muted); }
.text-soft { color: var(--ink-soft); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.78rem; }
.nowrap { white-space: nowrap; }
.balance { text-wrap: balance; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

mark.hl,
.hl {
  background: linear-gradient(transparent 58%, rgba(213, 255, 91, 0.75) 58%, rgba(213, 255, 91, 0.75) 94%, transparent 94%);
  padding: 0 0.06em;
  color: inherit;
  font-weight: inherit;
}
.hl-coral {
  background: linear-gradient(transparent 60%, rgba(240, 170, 145, 0.55) 60%, rgba(240, 170, 145, 0.55) 94%, transparent 94%);
}

/* ---------- сетки ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.row-end { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }

/* ---------- кнопки ---------- */
.btn {
  --btn-bg: var(--lime);
  --btn-ink: #10150a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.25s ease, box-shadow 0.3s ease, color 0.25s ease;
  position: relative;
  isolation: isolate;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn .btn-arrow {
  width: 22px; height: 22px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green-deep);
  font-size: 0.9rem;
  transition: transform 0.35s var(--ease);
}
.btn:hover .btn-arrow { transform: translateX(2px) rotate(-8deg); }

.btn-accent { --btn-bg: var(--lime); --btn-ink: var(--ink); }
.btn-accent:hover { box-shadow: var(--shadow-lime); }
.btn-accent .btn-arrow { background: var(--green-deep); color: var(--lime); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(213, 255, 91, 0.07); box-shadow: none; }

.btn-soft { --btn-bg: rgba(213, 255, 91, 0.12); --btn-ink: #e4ffb0; }
.btn-soft:hover { background: rgba(213, 255, 91, 0.2); box-shadow: none; }

.btn-danger { --btn-bg: #8f2f24; --btn-ink: #fff5f0; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.88rem; }
.btn-xs { min-height: 32px; padding: 5px 12px; font-size: 0.8rem; gap: 6px; }
.btn-lg { min-height: 58px; padding: 16px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.55; pointer-events: none; }

.link-arrow { color: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--green-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, gap 0.25s var(--ease);
}
.link-arrow:hover { border-color: var(--lime); gap: 12px; }

/* ---------- пилюли, бейджи, чипы ---------- */
.pill { background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.pill-lime { background: var(--lime); border-color: transparent; color: var(--ink); }
.pill-green { background: rgba(37, 73, 59, 0.1); border-color: transparent; color: var(--green-deep); }
.pill-coral { background: var(--coral-soft); border-color: transparent; color: #f6bba6; }
.pill-line { background: transparent; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: rgba(242, 245, 236, 0.08);
  color: var(--ink-soft);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.badge-ok { background: rgba(159, 232, 112, 0.14); color: #b9e9a9; }
.badge-info { background: rgba(143, 184, 255, 0.14); color: #b7cbff; }
.badge-warn { background: rgba(240, 170, 145, 0.2); color: #f6c6ae; }
.badge-bad { background: rgba(255, 138, 122, 0.14); color: #ff9e8d; }
.badge-live { background: var(--lime); color: var(--ink); }
.badge-muted { background: rgba(242, 245, 236, 0.06); color: var(--ink-muted); }
.badge-plain::before { display: none; }

/* ---------- карточки ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.4vw, 30px);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.card-flat { box-shadow: none; }
.card-soft { background: var(--bg-soft); border-color: transparent; box-shadow: none; }
.card-dark { background: #16241c; color: #eef3ea; border-color: transparent; }
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 { color: #fff; }
.card-dark .text-muted, .card-dark .text-soft { color: rgba(238, 243, 234, 0.72); }
.card-hover { transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.card-hover:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-pad-lg { padding: clamp(26px, 4vw, 46px); }

.icon-tile {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--lime);
  color: var(--green-deep);
  margin-bottom: 18px;
  flex: none;
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.tile-green { background: rgba(37, 73, 59, 0.1); }
.icon-tile.tile-coral { background: var(--coral-soft); }

/* ---------- хедер ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(247, 245, 238, 0.86);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(247, 245, 238, 0.94); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.logo svg { width: 40px; height: 40px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.02em; }
.logo-sub { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--green); font-weight: 700; margin-top: 4px; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.site-nav a {
  position: relative;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.site-nav a:hover { color: var(--ink); background: rgba(37, 73, 59, 0.07); }
.site-nav a[aria-current="page"] { color: var(--ink); background: rgba(37, 73, 59, 0.1); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.user-menu { position: relative; }
.user-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-deep);
  color: var(--lime);
  font-weight: 800;
  font-size: 0.85rem;
  flex: none;
}
.avatar-lg { width: 52px; height: 52px; font-size: 1.1rem; }
.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 2px;
}
.user-menu-dropdown a,
.user-menu-dropdown button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover { background: var(--bg-soft); color: var(--ink); }
.user-menu-dropdown .danger { color: #ff9d86; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.3s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px var(--gutter) 22px;
  background: rgba(247, 245, 238, 0.98);
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 11px 4px;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

/* ---------- флеш-сообщения ---------- */
.flash-stack {
  position: fixed;
  top: 88px; right: 20px;
  z-index: 120;
  display: grid;
  gap: 10px;
  max-width: min(380px, calc(100vw - 40px));
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  animation: alert-in 0.45s var(--ease) both;
}
.alert-icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert-success { border-color: rgba(159, 232, 112, 0.3); background: rgba(159, 232, 112, 0.1); color: #bdf0a0; }
.alert-error, .alert-danger { border-color: rgba(255, 138, 122, 0.32); background: rgba(255, 138, 122, 0.1); color: #ffbfb4; }
.alert-warning { border-color: rgba(255, 204, 102, 0.34); background: rgba(255, 204, 102, 0.09); color: #ffda8f; }
.alert-info { border-color: rgba(143, 184, 255, 0.3); background: rgba(143, 184, 255, 0.09); color: #bcd2ff; }
.alert-static { position: static; box-shadow: none; max-width: none; }
.alert-static + .alert-static { margin-top: 10px; }
@keyframes alert-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- формы ---------- */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.label { font-size: 0.84rem; font-weight: 700; color: var(--ink-soft); }
.label .req { color: #ff9b87; }
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #0f130e;
  font: inherit;
  font-size: 0.96rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.input::placeholder, .textarea::placeholder { color: #6f7a6c; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(85, 121, 105, 0.16);
  background: #0e120d;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5l6-6' fill='none' stroke='%2325483B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.hint { font-size: 0.8rem; color: var(--ink-muted); line-height: 1.45; }
.error-text { font-size: 0.82rem; font-weight: 600; color: #8f2f24; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: #ff8e79; box-shadow: 0 0 0 3px rgba(255, 142, 121, 0.16); }
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.45;
}
.checkbox input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green-deep); flex: none; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; font-weight: 800; margin-bottom: 12px; }

/* ---------- таблицы ---------- */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(238, 237, 227, 0.45); }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-compact th, .table-compact td { padding: 8px 10px; }

/* ---------- список фактов / чек-лист ---------- */
.check-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 32px; color: var(--ink-soft); font-size: 0.95rem; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 1px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green-deep);
  display: grid; place-items: center;
  font-size: 0.7rem;
  font-weight: 900;
}
.dot-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.dot-list li { position: relative; padding-left: 20px; font-size: 0.92rem; }
.dot-list li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ---------- раскрывающиеся блоки FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--green);
  transition: transform 0.3s var(--ease);
  flex: none;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 22px 20px; color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- табы ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 5px; background: var(--bg-soft); border-radius: 999px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a, .tabs button {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- пустые состояния ---------- */
.empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(28px, 5vw, 48px) 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(213, 255, 91, 0.06), transparent 60%),
    rgba(255, 255, 255, 0.035);
}
.empty svg { width: 120px; height: auto; opacity: 0.95; }
.empty h3 { margin: 4px 0 0; }
.empty p { max-width: 42ch; font-size: 0.92rem; }

/* ---------- прогресс ---------- */
.progress { height: 8px; border-radius: 999px; background: rgba(32, 40, 32, 0.08); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--lime-deep)); transition: width 0.6s var(--ease); }

/* ---------- анимации появления ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@keyframes float-y {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)); }
  50% { transform: translate3d(0, -14px, 0) rotate(calc(var(--rot, 0deg) + 2deg)); }
}
@keyframes float-y-soft {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -9px, 0); }
}
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  33% { transform: translate3d(10px, -14px, 0) rotate(4deg); }
  66% { transform: translate3d(-8px, 8px, 0) rotate(-3deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.04); }
}
@keyframes sheen {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ---------- футер ---------- */
.site-footer {
  margin-top: var(--section);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(238, 237, 227, 0.65));
  padding-top: clamp(40px, 6vw, 64px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
.footer-brand p { max-width: 34ch; color: var(--ink-muted); font-size: 0.9rem; margin-top: 14px; }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 14px; }
.footer-col a { display: block; padding: 4px 0; font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; }
.footer-col a:hover { color: var(--green-deep); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.footer-bottom a { color: var(--ink-muted); }
.tg-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; color: #cff7a2; font-size: 0.88rem; }

/* ============================================================
   Кабинеты: общий каркас приложения
   ============================================================ */
.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 40px);
  align-items: start;
  padding-block: clamp(22px, 3vw, 38px) var(--section);
}
.app-sidebar { position: sticky; top: 96px; display: grid; gap: 18px; }
.app-nav {
  display: grid;
  gap: 3px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.app-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.app-nav a svg { width: 19px; height: 19px; flex: none; opacity: 0.85; }
.app-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.app-nav a[aria-current="page"] { background: rgba(213, 255, 91, 0.14); color: var(--lime); }
.app-nav a[aria-current="page"] svg { opacity: 1; }
.app-nav a[aria-current="page"] .nav-count { background: var(--lime); color: var(--green-deep); }
.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(32, 40, 32, 0.08);
  color: var(--ink-soft);
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
}
.sidebar-card { padding: 18px; font-size: 0.86rem; }
.app-main { min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: clamp(18px, 2.4vw, 30px); }
.page-head h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 6px; }
.page-head .lead { font-size: 0.98rem; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--ink-muted); margin-bottom: 12px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--ink-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs span { opacity: 0.6; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.stat-value { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; line-height: 1.1; }
.stat-note { font-size: 0.78rem; color: var(--ink-muted); margin-top: 6px; }
.stat-accent { background: var(--lime); color: #0b0f0a; border-color: transparent; }
.stat-accent .stat-label, .stat-accent .stat-note { color: rgba(243, 247, 239, 0.7); }
.stat-lime { background: var(--lime); border-color: transparent; }

.section-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.section-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.section-card-head h2, .section-card-head h3 { margin: 0; font-size: 1.05rem; }
.section-card-body { padding: 20px 22px; }
.section-card-body.tight { padding: 10px 12px; }
.section-card + .section-card { margin-top: 18px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* элементы списков в кабинете */
.list { display: grid; gap: 0; }
.list-item { display: flex; align-items: flex-start; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item-main { flex: 1; min-width: 0; }
.list-item-title { font-weight: 700; font-size: 0.95rem; margin: 0 0 3px; }
.list-item-meta { font-size: 0.8rem; color: var(--ink-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.list-item-side { flex: none; display: flex; align-items: center; gap: 8px; }
.lesson-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lesson-row + .lesson-row { margin-top: 10px; }
.lesson-date { text-align: center; padding: 6px 12px; border-radius: 12px; background: var(--bg-soft); min-width: 64px; }
.lesson-date b { display: block; font-size: 1.25rem; line-height: 1; }
.lesson-date span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); }
.kv { display: grid; gap: 9px; }
.kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 0.9rem; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-row dt, .kv-label { color: var(--ink-muted); font-weight: 600; }
.kv-row dd, .kv-value { margin: 0; font-weight: 700; text-align: right; }

/* ---------- календарь ---------- */
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-col { display: grid; gap: 8px; align-content: start; }
.week-col-head { text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--bg-soft); }
.week-col-head b { display: block; font-size: 0.8rem; }
.week-col-head span { font-size: 0.7rem; color: var(--ink-muted); }
.slot {
  display: block;
  width: 100%;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green-deep);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s ease, border-color 0.2s ease;
  min-height: 38px;
}
.slot:hover { transform: translateY(-1px); border-color: var(--green); }
.slot.is-selected { background: var(--green-deep); color: #fff; border-color: transparent; }
.slot.is-hold { background: rgba(255, 204, 102, 0.14); color: #ffd98a; border-color: rgba(255, 204, 102, 0.35); border-style: dashed; }
.slot.is-busy { background: rgba(32, 40, 32, 0.05); color: var(--ink-muted); cursor: not-allowed; text-decoration: line-through; }
.slot.is-off { background: transparent; border-style: dashed; color: var(--ink-muted); cursor: not-allowed; }
.slot.is-free { background: rgba(213, 255, 91, 0.07); }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month-cell { min-height: 74px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 0.78rem; }
.month-cell.is-today { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.month-cell.is-muted { opacity: 0.45; background: transparent; }
.month-cell b { display: block; margin-bottom: 4px; }
.month-event { display: block; margin-top: 4px; padding: 2px 5px; border-radius: 5px; background: var(--bg-soft); font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-event.tone-trial { background: var(--lime); }
.month-event.tone-paid { background: rgba(159, 232, 112, 0.2); }
.month-event.tone-cancel { background: rgba(255, 122, 107, 0.2); }
.calendar-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--ink-muted); }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* ---------- шаги записи ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.step-pill { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; background: var(--bg-soft); font-size: 0.82rem; font-weight: 700; color: var(--ink-muted); }
.step-pill b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(32, 40, 32, 0.08); font-size: 0.72rem; }
.step-pill.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.step-pill.is-active b { background: var(--green-deep); color: var(--lime); }
.step-pill.is-done b { background: var(--lime); color: var(--green-deep); }
.booking-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr); gap: 20px; align-items: start; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.summary-card { position: sticky; top: 96px; }

/* ---------- видео-комната ---------- */
.room { min-height: calc(100vh - 76px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #14201a; color: #eaf1e6; margin: 0; }
.room-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); flex-wrap: wrap; }
.room-title { font-weight: 800; letter-spacing: -0.01em; }
.room-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.82rem; color: rgba(234, 241, 230, 0.7); }
.room-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 14px; min-height: 0; }
.video-tile { position: relative; border-radius: 18px; overflow: hidden; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); min-height: 220px; display: grid; place-items: center; }
.video-tile video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; background: #0c1512; }
.video-tile.is-self { order: 2; }
.video-tile-label { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 5px 11px; border-radius: 999px; background: rgba(10, 18, 14, 0.66); backdrop-filter: blur(8px); font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.mic-off-badge { position: absolute; right: 12px; top: 12px; z-index: 2; padding: 4px 9px; border-radius: 999px; background: rgba(143, 47, 36, 0.85); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.video-placeholder { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 24px; color: rgba(234, 241, 230, 0.72); }
.video-placeholder .avatar { width: 74px; height: 74px; font-size: 1.5rem; background: rgba(213, 255, 91, 0.16); color: var(--lime); }
.room-controls { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px 22px; flex-wrap: wrap; }
.ctrl {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #eef4ea;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s var(--ease);
}
.ctrl:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.ctrl.is-off { background: rgba(143, 47, 36, 0.55); border-color: transparent; }
.ctrl-primary { background: var(--lime); color: var(--green-deep); border-color: transparent; }
.ctrl-danger { background: #8f2f24; border-color: transparent; }
.ctrl svg { width: 19px; height: 19px; }
.room-status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 0.78rem; font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-muted); display: inline-block; flex: none; }
.dot-ok { background: #7ed9a1; }
.dot-warn { background: #f2c36b; }
.dot-bad { background: #e77c66; }
.dot-live { background: var(--lime); animation: pulse-soft 1.6s infinite; }
.room-preflight { max-width: 560px; margin: 0 auto; padding: 30px 20px; text-align: center; }
.room-preflight video { width: 100%; max-width: 420px; margin: 0 auto 18px; border-radius: 18px; background: #0c1512; aspect-ratio: 4 / 3; object-fit: cover; }
.room-side { display: grid; gap: 10px; align-content: start; padding: 14px; border-left: 1px solid rgba(255, 255, 255, 0.1); }

/* ---------- карточки продуктов / цен ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); position: relative; }
.price-card.is-featured { background: var(--green-deep); color: #eef3ea; border-color: transparent; box-shadow: var(--shadow-md); }
.price-card.is-featured h3, .price-card.is-featured .price-value { color: #fff; }
.price-card.is-featured .text-muted, .price-card.is-featured .hint, .price-card.is-featured li { color: rgba(238, 243, 234, 0.74); }
.price-card .price-value { font-size: clamp(2rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.price-card .price-value small { font-size: 0.95rem; font-weight: 700; letter-spacing: 0; color: var(--ink-muted); }
.price-card .price-list { margin: 18px 0 22px; display: grid; gap: 9px; }
.price-card .btn { margin-top: auto; }
.price-badge { position: absolute; top: 18px; right: 18px; }

/* ---------- предложение ---------- */
.offer-card { position: relative; overflow: hidden; background: var(--green-deep); color: #eef4ea; border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 44px); }
.offer-card::before {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  right: -80px; top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213, 255, 91, 0.3), transparent 68%);
  animation: pulse-soft 7s infinite;
}
.offer-card h2, .offer-card h3 { color: #fff; }
.offer-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.offer-price { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 18px; }
.offer-price b { font-size: clamp(2rem, 3.4vw, 2.8rem); letter-spacing: -0.04em; }
.offer-note { padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); font-size: 0.9rem; }

/* ---------- уведомления ---------- */
.notif { display: flex; gap: 13px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.notif.is-unread { background: rgba(213, 255, 91, 0.07); border-color: rgba(213, 255, 91, 0.4); }
.notif + .notif { margin-top: 9px; }
.notif-icon { width: 36px; height: 36px; border-radius: 11px; background: var(--bg-soft); display: grid; place-items: center; flex: none; }
.notif-body { flex: 1; min-width: 0; font-size: 0.9rem; }
.notif-title { font-weight: 700; margin-bottom: 2px; }

/* ---------- домашка ---------- */
.hw-card { display: grid; gap: 12px; }
.hw-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hw-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-muted); }
.due { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.8rem; }
.due.is-soon { color: #ffc08a; }
.due.is-overdue { color: #ff9e8d; }
.attachment-list { display: grid; gap: 8px; }
.attachment {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fffdf8;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.attachment:hover { border-color: var(--green); }
.attachment svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submission { border-left: 3px solid var(--line-strong); padding: 4px 0 4px 14px; }
.submission + .submission { margin-top: 14px; }

/* ---------- профиль/сессии ---------- */
.session-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.session-row:last-child { border-bottom: 0; }
.ua { font-size: 0.76rem; color: var(--ink-muted); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- чат комнаты ---------- */
.room-chat { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 160px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px; overflow: hidden; }
.room-chat-log { padding: 12px; display: grid; gap: 8px; align-content: start; overflow-y: auto; max-height: 42vh; font-size: 0.84rem; }
.chat-msg { padding: 8px 11px; border-radius: 11px; background: rgba(255, 255, 255, 0.08); }
.chat-msg b { display: block; font-size: 0.72rem; opacity: 0.72; margin-bottom: 2px; }
.chat-msg.is-me { background: rgba(213, 255, 91, 0.16); }
.room-chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.room-chat-form input { flex: 1; min-height: 38px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); color: #fff; padding: 8px 11px; font: inherit; font-size: 0.85rem; }
.room-chat-form button { border: 0; border-radius: 9px; background: var(--lime); color: var(--green-deep); font-weight: 800; padding: 8px 13px; cursor: pointer; }

/* ---------- модальное окно ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 32, 26, 0.55);
  backdrop-filter: blur(6px);
  animation: alert-in 0.25s ease both;
}
.modal[hidden] { display: none; }
.modal-card { width: min(520px, 100%); max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow-md); }

/* ---------- печать ---------- */
@media print {
  .site-header, .site-footer, .app-sidebar, .flash-stack, .btn { display: none !important; }
  body { background: #fff; }
}

/* ============================================================
   Адаптивность
   ============================================================ */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .room-stage { grid-template-columns: 1fr; }
  .room { grid-template-rows: auto auto 1fr auto; }
  .room-side { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .site-nav, .header-actions .desktop-only { display: none; }
  .nav-toggle { display: grid; margin-left: auto; }
  .header-actions { margin-left: 0; }
  .split { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .two-col, .booking-grid, .three-col { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: static; }
  .app-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-card { position: static; }
  .week-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .offer-price { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4, .stat-grid, .footer-grid, .field-row { grid-template-columns: 1fr; }
  .app-nav { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-row { grid-template-columns: auto minmax(0, 1fr); }
  .lesson-row .list-item-side { grid-column: 1 / -1; justify-content: flex-end; }
  .site-footer { margin-top: 64px; }
  .flash-stack { top: auto; bottom: 16px; left: 16px; right: 16px; }
  .room-controls .ctrl { padding: 10px 14px; font-size: 0.8rem; }
  .room-controls .ctrl span { display: none; }
  .room-controls .ctrl-primary span, .room-controls .ctrl-danger span { display: inline; }
  .months-grid, .month-grid { gap: 4px; }
  .month-cell { min-height: 58px; padding: 5px; font-size: 0.7rem; }
  .tabs { width: 100%; }
}

/* ---------- уважение к настройкам пользователя ---------- */
@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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- запись: выбор типа занятия и полоса дней ---------- */
.choice-grid { display: grid; gap: 10px; }
.choice { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; position: relative; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover { border-color: var(--green); }
.choice.is-active { border-color: var(--green-deep); box-shadow: 0 0 0 2px rgba(37, 73, 59, 0.12); }
.choice.is-disabled { opacity: 0.55; cursor: not-allowed; }
.choice-badge { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--bg-soft); color: var(--green-deep); }
.choice-body { display: grid; gap: 2px; }
.choice-price { font-weight: 800; color: var(--green-deep); white-space: nowrap; font-size: 0.85rem; }
.booking-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.day-chip { flex: 0 0 auto; display: grid; justify-items: center; gap: 1px; min-width: 62px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 0.72rem; color: var(--ink-muted); scroll-snap-align: start; }
.day-chip b { font-size: 1rem; color: var(--ink); }
.day-chip em { font-style: normal; font-weight: 700; color: var(--green-deep); }
.day-chip.is-empty { opacity: 0.55; }
.day-chip.is-active { border-color: var(--lime); background: var(--lime); color: #0b0f0a; }
.day-chip.is-active b, .day-chip.is-active em { color: #fff; }
.booking-summary { display: grid; gap: 4px; margin: 0 0 12px; }
.bk-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.bk-row dt { font-size: 0.82rem; color: var(--ink-muted); }
.bk-row dd { margin: 0; font-weight: 700; text-align: right; }
.month-cell.is-selected { outline: 2px solid var(--green-deep); outline-offset: -2px; }
.slot.is-free[aria-pressed="true"], .slot.is-selected { background: var(--green-deep); color: #fff; border-color: transparent; }


/* ============================================================
   DARK THEME — надстройка над светлыми токенами
   ============================================================ */
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* атмосферный фон: аврора + зерно (элемент .bg-aurora в base.html) */
.bg-aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(56% 44% at 10% -4%, rgba(213, 255, 91, 0.1), transparent 62%),
    radial-gradient(48% 40% at 92% 2%, rgba(240, 170, 145, 0.1), transparent 64%),
    radial-gradient(72% 62% at 50% 108%, rgba(38, 82, 62, 0.4), transparent 66%),
    var(--bg);
}
.bg-aurora::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: radial-gradient(rgba(242, 245, 236, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(80% 70% at 50% 20%, #000 20%, transparent 100%);
}
.bg-aurora::after {
  content: ""; position: absolute; inset: -22%;
  background:
    radial-gradient(28% 28% at 32% 34%, rgba(213, 255, 91, 0.07), transparent 70%),
    radial-gradient(24% 24% at 68% 62%, rgba(240, 170, 145, 0.06), transparent 70%);
  filter: blur(14px);
  animation: aurora-drift 26s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  to { transform: translate3d(3%, -2.5%, 0) scale(1.07) rotate(1.5deg); }
}

/* шапка */
header.site-header {
  background: rgba(10, 13, 10, 0.7);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
}
header.site-header.is-scrolled {
  background: rgba(10, 13, 10, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  border-bottom-color: rgba(242, 245, 236, 0.06);
}
.site-nav a { color: var(--ink-soft); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.user-menu > summary { background: rgba(255, 255, 255, 0.05); }
.mobile-nav { background: rgba(10, 13, 10, 0.97); border-color: var(--line); }

/* кнопки */
.btn { --btn-bg: var(--lime); --btn-ink: #0b0f0a; box-shadow: 0 10px 26px rgba(213, 255, 91, 0.14); }
.btn:hover { box-shadow: 0 16px 40px rgba(213, 255, 91, 0.24); }
.btn .btn-arrow { background: #0b0f0a; color: var(--lime); }
.btn-ghost { --btn-bg: transparent; --btn-ink: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn-ghost .btn-arrow { background: rgba(213, 255, 91, 0.16); color: var(--lime); }
.btn-soft .btn-arrow { background: rgba(11, 15, 10, 0.18); color: #0b0f0a; }
.btn-accent { --btn-bg: var(--lime); --btn-ink: #0b0f0a; }
.btn-danger { --btn-bg: #8f2f24; --btn-ink: #ffe9e4; box-shadow: none; }

/* карточки и поверхности */
.card, .section-card, .stat, .app-nav, .faq details, .notif, .lesson-row,
.hw-card, .choice, .table-wrap, .panel {
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)), var(--surface);
  border-color: var(--line);
}
.card-soft, .choice.is-selected { background: var(--bg-soft); }
.card-hover:hover {
  border-color: rgba(213, 255, 91, 0.26);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(213, 255, 91, 0.1);
}
.section-card, .card { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* линии, таблицы */
hr, .divider { border-color: var(--line); }
.table th { color: var(--ink-muted); border-bottom-color: var(--line); }
.table td { border-bottom-color: rgba(242, 245, 236, 0.07); }
.table tbody tr:hover td { background: rgba(213, 255, 91, 0.045); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* формы */
.input, .select, .textarea { background: #0f130e; color: var(--ink); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(213, 255, 91, 0.55);
  box-shadow: 0 0 0 4px rgba(213, 255, 91, 0.12);
  background: #0e120d;
}
.select option { background: #0f130e; color: var(--ink); }
input:-webkit-autofill, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px #0f130e inset;
  caret-color: var(--ink);
}

/* премиальные блоки */
.price-card.is-featured, .offer-card {
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(213, 255, 91, 0.16), transparent 55%),
    linear-gradient(158deg, #16241c, #0d1410);
  border-color: rgba(213, 255, 91, 0.22);
  color: var(--ink);
}
.price-card.is-featured .text-muted, .offer-card .text-muted { color: rgba(242, 245, 236, 0.68); }
.offer-card, .price-card.is-featured { box-shadow: var(--shadow-md); }
.section-dark, .cta-band { background: #101610; }

/* разные мелочи */
.pill-lime { color: #0b0f0a; }
.badge-live { color: #0b0f0a; }
.stat-accent .text-muted { color: rgba(11, 15, 10, 0.62); }
.user-menu-dropdown { background: #121712; }
.alert { background: #121712; }
.avatar { background: linear-gradient(145deg, #2c5844, #1a3026); color: var(--lime); }
.eyebrow { color: var(--lime); }
.footer-note, .site-footer { color: var(--ink-muted); }
.site-footer { border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.room { background: #080b08; }

/* скроллбар */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(213, 255, 91, 0.18);
  border-radius: 999px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(213, 255, 91, 0.32); }

/* ============================================================
   MOTION SYSTEM
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal-scale { opacity: 0; transform: scale(0.94); }
.reveal-scale.is-in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal-left { opacity: 0; transform: translateX(-32px); }
.reveal-left.is-in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-parallax] { will-change: transform; }
.tilt { transform-style: preserve-3d; transition: transform 0.35s var(--ease); }
.hover-lift { transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.hover-lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.text-gradient {
  background: linear-gradient(96deg, #f2f5ec 4%, #d5ff5b 52%, #f0aa91 98%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.float { animation: floaty 7s ease-in-out infinite; }
.float-slow { animation: floaty 11s ease-in-out infinite; }
.float-delay { animation-delay: -3.2s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.spin-slow { animation: spin 30s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse-ring { position: relative; }
.pulse-ring::after {
  content: ""; position: absolute; inset: -6px; border-radius: inherit;
  border: 1px solid rgba(213, 255, 91, 0.5);
  animation: ring-pulse 3.2s ease-out infinite;
}
@keyframes ring-pulse {
  0% { opacity: 0.9; transform: scale(0.96); }
  70%, 100% { opacity: 0; transform: scale(1.14); }
}
.shimmer {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.06) 20%, rgba(213, 255, 91, 0.22) 40%, rgba(255, 255, 255, 0.06) 60%);
  background-size: 220% 100%;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }
.num-glow { text-shadow: 0 0 22px rgba(213, 255, 91, 0.35); }
.blink { animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* глобальные входные анимации секций */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.86) translateY(10px); }
  70% { transform: scale(1.02) translateY(0); }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-scale, .reveal-left { opacity: 1 !important; transform: none !important; }
}
/* ------------------------------------------------------------
   Тёмная тема: иконки-плитки внутри карточек
   ------------------------------------------------------------ */
.icon-tile {
  background: rgba(213, 255, 91, 0.12) !important;
  color: var(--lime) !important;
  border: 1px solid rgba(213, 255, 91, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.icon-tile.tile-green { background: rgba(85, 121, 105, 0.18) !important; color: #9fe0c4 !important; border-color: rgba(159, 224, 196, 0.22); }
.icon-tile.tile-coral { background: rgba(240, 170, 145, 0.13) !important; color: var(--coral) !important; border-color: rgba(240, 170, 145, 0.26); }
.icon-tile.tile-lime  { background: rgba(213, 255, 91, 0.14) !important; color: var(--lime) !important; border-color: rgba(213, 255, 91, 0.3); }
/* ------------------------------------------------------------
   Тёмная тема: текстовые акценты, которые раньше были на светлом
   ------------------------------------------------------------ */
.link-arrow, .link-arrow:visited { color: var(--lime); }
.link-arrow:hover { color: #eaffb0; border-color: var(--lime); }
.pill-green { background: rgba(213, 255, 91, 0.12); color: #e6ff9e; border-color: rgba(213, 255, 91, 0.28); }
.choice-price, .choice-badge, .day-chip em { color: var(--lime); }
.choice-badge { background: rgba(213, 255, 91, 0.1); }
.hero h1 .accent { color: var(--lime); }
.teacher-portrait .portrait-letter { color: rgba(242, 245, 236, 0.92); }
.teacher-portrait .portrait-caption { color: var(--ink-soft); }
.footer-col a:hover { color: var(--lime); }
.slot { color: var(--ink-soft); }
.btn-ghost { border-color: rgba(242, 245, 236, 0.24); color: var(--ink); }
.btn-ghost:hover { background: rgba(213, 255, 91, 0.08); border-color: rgba(213, 255, 91, 0.4); }
/* Мягкая кнопка в тёмной теме. */
.btn:hover { box-shadow: 0 12px 30px rgba(213, 255, 91, 0.18); }
.btn-soft { --btn-bg: rgba(255, 255, 255, 0.06); --btn-ink: var(--ink); border-color: rgba(255, 255, 255, 0.12); }
.btn-ghost { --btn-bg: transparent; }
/* таблицы в кабинетах: аккуратные ссылки и ячейки */
.table td.nowrap, .table th { white-space: nowrap; }
.table a { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(213, 255, 91, 0.28); }
.table a:hover { color: var(--lime); border-bottom-color: var(--lime); }
.table-compact th { font-size: 0.68rem; letter-spacing: 0.09em; }
.table-compact td { font-size: 0.9rem; }
