/* «Мир в душе» — стили сайта, кабинета и админки.
   Цвета из фирменной палитры: зелёный #3E5C50, золото #C9A671, беж #D9CBB8, текст #1A1A1A. */

@font-face {
  font-family: "Lora";
  src: url("/static/fonts/Lora-Variable.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1a1a1a;
  --ink-2: #4b4843;
  --ink-3: #6b665e;
  --forest: #3e5c50;
  --forest-deep: #2e4a40;
  --forest-night: #243b33;
  --on-forest: #f4efe6;
  --on-forest-2: #bccabf;
  --gold: #c9a671;
  --gold-deep: #8a6630;
  --sand: #d9cbb8;
  --sand-soft: #efe7da;
  --paper: #faf7f2;
  --white: #ffffff;
  --danger: #9b3b2e;
  --danger-soft: #f6e4df;
  --ok-soft: #e3ece6;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 40rem;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, iframe { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.2rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.2rem); }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--forest); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--forest-deep); text-decoration-thickness: 2px; }

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

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: var(--measure); }
.muted { color: var(--ink-3); }
.small { font-size: 0.9rem; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 50; }
.skip-link:focus { left: 8px; }

/* ── Кнопки ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7em 1.35em;
  border: 1.5px solid var(--forest); border-radius: var(--radius-m);
  background: var(--forest); color: var(--on-forest);
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--forest-deep); border-color: var(--forest-deep); color: var(--on-forest); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--forest); }
.btn--ghost:hover { background: var(--forest); color: var(--on-forest); }
.btn--light { background: var(--on-forest); border-color: var(--on-forest); color: var(--forest-deep); }
.btn--light:hover { background: var(--white); border-color: var(--white); color: var(--forest-deep); }
.btn--small { min-height: 38px; padding: 0.45em 0.95em; font-size: 0.93rem; border-radius: var(--radius-s); }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: #7e2e23; border-color: #7e2e23; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; color: var(--forest); font: inherit; text-decoration: underline; cursor: pointer; }

/* ── Шапка ────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--sand); background: var(--paper); }
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.1; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; }
.brand__owner { font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.01em; }
.brand:hover { color: var(--ink); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav__menu summary { list-style: none; cursor: pointer; }
.nav__menu summary::-webkit-details-marker { display: none; }
.nav__mobile { display: none; }
.nav__toggle { display: inline-flex; align-items: center; min-height: 38px; padding: 0 0.9em; border: 1.5px solid var(--sand); border-radius: var(--radius-s); font-weight: 600; }
.nav__list { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; }
.nav__list a, .nav__admin { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav__list a:hover, .nav__list a[aria-current="page"], .nav__admin:hover { color: var(--forest); text-decoration: underline; }
.nav__account { font-weight: 600; text-decoration: none; padding: 0.45em 0.95em; border: 1.5px solid var(--forest); border-radius: var(--radius-s); }
.nav__account:hover { background: var(--forest); color: var(--on-forest); text-decoration: none; }

.page-home .site-header, .page-dark .site-header { background: var(--forest-deep); border-bottom-color: rgba(255,255,255,.08); }
.page-home .brand, .page-dark .brand { color: var(--on-forest); }
.page-home .brand__owner, .page-dark .brand__owner { color: var(--on-forest-2); }
.page-home .nav__desktop a, .page-home .nav__admin, .page-dark .nav__desktop a, .page-dark .nav__admin { color: var(--on-forest-2); }
.page-home .nav__desktop a:hover, .page-dark .nav__desktop a:hover { color: var(--on-forest); }
.page-home .nav__account, .page-dark .nav__account { color: var(--on-forest); border-color: rgba(244,239,230,.45); }
.page-home .nav__account:hover, .page-dark .nav__account:hover { background: var(--on-forest); color: var(--forest-deep); }
.page-home .nav__toggle, .page-dark .nav__toggle { color: var(--on-forest); border-color: rgba(244,239,230,.45); }

@media (max-width: 860px) {
  .nav { gap: 10px; }
  .nav__desktop, .nav__admin { display: none; }
  .nav__mobile { display: block; position: relative; }
  .nav__mobile[open] .nav__list {
    display: flex; flex-direction: column; gap: 4px; position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
    min-width: 220px; padding: 10px; background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-m);
    box-shadow: 0 12px 30px rgba(26,26,26,.12);
  }
  .nav__mobile[open] .nav__list a { display: block; padding: 10px 12px; color: var(--ink); border-radius: var(--radius-s); }
}

.flash { background: var(--ok-soft); color: var(--forest-deep); padding: 12px 0; font-weight: 500; border-bottom: 1px solid #cfdcd3; }

/* ── Первый экран главной: вопрос теста ────────────── */
.hero { background: var(--forest-deep); color: var(--on-forest); padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 8vw, 110px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero__label { font-family: var(--sans); font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--on-forest-2); margin-bottom: 1.4rem; }
.hero__label strong { color: var(--gold); font-weight: 600; }
.hero__question { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 1.2rem + 3.3vw, 3.5rem); line-height: 1.12; margin: 0 0 1.2rem; text-wrap: balance; }
.hero__note { color: var(--on-forest-2); max-width: 30rem; }
.hero__answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.answer {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 18px;
  border: 1px solid rgba(244,239,230,.22); border-radius: var(--radius-m);
  color: var(--on-forest); text-decoration: none; background: rgba(255,255,255,.03);
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.answer__letter { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); font-weight: 600; font-size: .95rem; }
.answer:hover { border-color: var(--gold); background: rgba(201,166,113,.10); color: var(--on-forest); text-decoration: none; }
.answer:hover .answer__letter { background: var(--gold); color: var(--forest-night); }
.hero__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--on-forest-2); font-size: .95rem; border-top: 1px solid rgba(244,239,230,.12); padding-top: 22px; margin-top: 8px; }
.hero__foot a { color: var(--on-forest); }

@media (prefers-reduced-motion: no-preference) {
  .hero__question, .hero__answers li { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero__answers li:nth-child(1) { animation-delay: .15s; }
  .hero__answers li:nth-child(2) { animation-delay: .22s; }
  .hero__answers li:nth-child(3) { animation-delay: .29s; }
  .hero__answers li:nth-child(4) { animation-delay: .36s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

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

/* ── Секции ───────────────────────────────────────── */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--tight { padding: clamp(32px, 5vw, 56px) 0; }
.section--sand { background: var(--sand-soft); }
.section__head { max-width: 44rem; margin-bottom: clamp(24px, 4vw, 40px); }
.section__head p { color: var(--ink-2); font-size: 1.1rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--gold); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--gold-deep); margin-bottom: 12px; }
.steps h3 { margin-bottom: .35em; }
.steps p { color: var(--ink-2); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Список продуктов: строки, а не одинаковые карточки */
.offers { border-top: 1px solid var(--sand); }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: end; padding: 26px 0; border-bottom: 1px solid var(--sand); }
.offer__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin: 0 0 .25em; }
.offer__title a { color: var(--ink); text-decoration: none; }
.offer__title a:hover { color: var(--forest); text-decoration: underline; }
.offer__text { color: var(--ink-2); max-width: 38rem; margin: 0; }
.offer__side { display: flex; align-items: center; gap: 20px; }
.offer__price { font-weight: 600; white-space: nowrap; }
@media (max-width: 700px) { .offer { grid-template-columns: 1fr; } .offer__side { justify-content: space-between; } }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }
.panel { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-l); padding: clamp(22px, 3vw, 34px); }
.panel h3 { margin-bottom: .4em; }
.panel--forest { background: var(--forest-deep); color: var(--on-forest); border-color: var(--forest-deep); }
.panel--forest a:not(.btn) { color: var(--on-forest); }
.panel--forest .muted { color: var(--on-forest-2); }

/* Обо мне */
.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.about__quote { font-family: var(--serif); font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); line-height: 1.35; margin: 0 0 1.2rem; }
.credentials { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--gold); }
.credentials li { padding: 0 0 18px 20px; color: var(--ink-2); }
.credentials li strong { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* Вопросы и ответы */
.faq { max-width: 46rem; border-top: 1px solid var(--sand); }
.faq details { border-bottom: 1px solid var(--sand); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font-weight: 600; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.6rem; color: var(--gold-deep); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--ink-2); max-width: 40rem; }

.cta { text-align: left; }
.cta__title { max-width: 30rem; }

/* ── Страница продукта ────────────────────────────── */
.crumbs { font-size: .9rem; color: var(--ink-3); margin: 22px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--sand); }
.crumbs a { color: var(--ink-3); }
.product-hero { padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px); }
.product-hero h1 { max-width: 20ch; }
.facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { background: var(--white); border: 1px solid var(--sand); border-radius: 999px; padding: 6px 14px; font-size: .95rem; color: var(--ink-2); }
.prose { max-width: var(--measure); font-size: 1.1rem; }
.prose p { margin-bottom: 1.1em; }
.prose h2, .prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1.2em 0; padding: 0 0 0 18px; border-left: 3px solid var(--gold); color: var(--ink-2); font-family: var(--serif); font-size: 1.15rem; }

.program { list-style: none; margin: 0; padding: 0; max-width: 46rem; counter-reset: lesson; }
.program li { counter-increment: lesson; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--sand); }
.program li::before { content: counter(lesson, decimal-leading-zero); font-family: var(--serif); color: var(--gold-deep); font-size: 1.05rem; }
.program__meta { font-size: .88rem; color: var(--ink-3); white-space: nowrap; }

.tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; }
.tariff { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-l); padding: 26px 24px; }
.tariff--featured { border: 2px solid var(--gold); position: relative; }
.tariff__badge { position: absolute; top: -13px; left: 22px; background: var(--gold); color: var(--forest-night); font-size: .82rem; font-weight: 600; padding: 3px 12px; border-radius: 999px; }
.tariff__title { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.tariff__price { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.1; margin: 0 0 4px; }
.tariff__period { font-size: .95rem; color: var(--ink-3); }
.tariff__body { color: var(--ink-2); margin: 14px 0 18px; flex: 1; }
.tariff__body ul { padding-left: 1.1em; margin: 0; }
.tariff__body li { margin-bottom: 4px; }
.tariff form { display: grid; gap: 10px; }
.tariff__state { font-weight: 600; color: var(--forest); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--forest); }

/* ── Формы ────────────────────────────────────────── */
.form { display: grid; gap: 16px; max-width: 30rem; }
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .88rem; color: var(--ink-3); }
input[type="text"], input[type="email"], input[type="number"], input[type="url"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--sand); border-radius: var(--radius-s);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--forest); outline: none; box-shadow: 0 0 0 3px rgba(62,92,80,.15); }
.code-input { font-size: 1.8rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.error { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-s); padding: 12px 14px; font-weight: 500; }
.note { background: var(--sand-soft); border-radius: var(--radius-m); padding: 14px 18px; color: var(--ink-2); }

.auth { min-height: 60vh; display: grid; place-items: center; padding: clamp(32px, 6vw, 72px) 0; }
.auth__box { width: 100%; max-width: 30rem; }
.auth__box h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); }

/* ── Прохождение теста ────────────────────────────── */
.runner { max-width: 44rem; margin: 0 auto; padding: clamp(24px, 5vw, 56px) var(--gutter) 64px; }
.runner__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--ink-3); font-size: .95rem; }
.progress { height: 4px; background: var(--sand); border-radius: 4px; overflow: hidden; margin-bottom: clamp(24px, 4vw, 40px); }
.progress__bar { height: 100%; background: var(--gold); width: 0; transition: width .3s ease; }
.question { border: 0; margin: 0 0 40px; padding: 0; }
.question legend { font-family: var(--serif); font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.1rem); line-height: 1.2; font-weight: 500; margin-bottom: 22px; padding: 0; }
.question__number { display: block; font-family: var(--sans); font-size: .95rem; color: var(--ink-3); margin-bottom: 8px; font-weight: 500; }
.options { display: grid; gap: 10px; }
.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option span { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 14px 18px; background: var(--white); border: 1.5px solid var(--sand); border-radius: var(--radius-m); transition: border-color .12s ease, background-color .12s ease; }
.option span::before { content: attr(data-letter); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold-deep); font-weight: 600; font-size: .9rem; }
.option:hover span { border-color: var(--forest); }
.option input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.option input:checked + span { border-color: var(--forest); background: var(--ok-soft); }
.option input:checked + span::before { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
.runner__actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.js-stepper .question { display: none; }
.js-stepper .question.is-current { display: block; }
.js-stepper .runner__submit { display: none; }
.js-stepper.is-complete .runner__submit { display: inline-flex; }

/* ── Результат теста ──────────────────────────────── */
.result-hero { background: var(--forest-deep); color: var(--on-forest); padding: clamp(40px, 7vw, 80px) 0; }
.result-hero__label { color: var(--on-forest-2); margin-bottom: 10px; }
.result-hero h1 { font-weight: 500; margin: 0; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .result-layout { grid-template-columns: 1fr; } }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bars__row { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: 6px; }
.bars__track { height: 8px; background: var(--sand-soft); border-radius: 8px; overflow: hidden; }
.bars__fill { height: 100%; background: var(--sand); border-radius: 8px; }
.bars li:first-child .bars__fill { background: var(--forest); }
.disclaimer { font-family: var(--serif); font-size: 1.1rem; color: var(--ink-2); border-left: 3px solid var(--gold); padding-left: 18px; margin: 32px 0; }
.share { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Кабинет ──────────────────────────────────────── */
.cabinet-head { padding: clamp(28px, 5vw, 48px) 0 8px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; }
.cabinet-head h1 { margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 8px; font-weight: 500; }
.tabs a { color: var(--ink-2); text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"], .tabs a:hover { color: var(--forest); border-bottom-color: var(--gold); }
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.course-card { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-l); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.course-card h3 { margin: 0; }
.meter { height: 6px; background: var(--sand-soft); border-radius: 6px; overflow: hidden; }
.meter__fill { height: 100%; background: var(--gold); }
.lesson-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sand); }
.lesson-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--sand); }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--sand); display: grid; place-items: center; font-size: .8rem; color: transparent; }
.tick.is-done { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
.lesson { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(24px, 4vw, 56px); padding: clamp(24px, 4vw, 40px) 0 64px; align-items: start; }
@media (max-width: 900px) { .lesson { grid-template-columns: 1fr; } .lesson__aside { order: 2; } }
.player { position: relative; aspect-ratio: 16 / 9; background: var(--forest-night); border-radius: var(--radius-m); overflow: hidden; margin-bottom: 24px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.files li { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-m); padding: 12px 16px; }
.files audio { width: 100%; margin-top: 8px; }
.lesson__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.lesson__aside ol { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.lesson__aside li { padding: 8px 0; border-bottom: 1px solid var(--sand); }
.lesson__aside li a { text-decoration: none; color: var(--ink-2); }
.lesson__aside li a[aria-current="page"] { color: var(--forest); font-weight: 600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--sand); border-radius: var(--radius-m); background: var(--white); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--sand-soft); vertical-align: top; }
.table th { font-weight: 600; color: var(--ink-2); background: #fcfaf6; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.status { display: inline-block; font-size: .82rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--sand-soft); color: var(--ink-2); white-space: nowrap; }
.status--paid, .status--active { background: var(--ok-soft); color: var(--forest-deep); }
.status--pending, .status--past_due { background: #f6ecd9; color: var(--gold-deep); }
.status--refunded, .status--canceled, .status--expired { background: var(--danger-soft); color: var(--danger); }

/* ── Страница заказа ──────────────────────────────── */
.order { max-width: 36rem; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter); text-align: left; }
.order__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 20px; background: var(--ok-soft); color: var(--forest); }
.order__icon--wait { background: #f6ecd9; color: var(--gold-deep); }
.order__icon--fail { background: var(--danger-soft); color: var(--danger); }
.summary { list-style: none; padding: 0; margin: 20px 0 28px; border-top: 1px solid var(--sand); }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sand); }

/* ── Подвал ───────────────────────────────────────── */
.site-footer { background: var(--forest-night); color: var(--on-forest-2); padding: 48px 0 28px; margin-top: 0; font-size: .95rem; }
.site-footer a { color: var(--on-forest); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 28px; }
.site-footer__brand { font-family: var(--serif); font-size: 1.3rem; color: var(--on-forest); margin-bottom: 6px; }
.site-footer__title { color: var(--on-forest); font-weight: 600; margin-bottom: 8px; }
.site-footer__legal { border-top: 1px solid rgba(244,239,230,.12); margin-top: 32px; padding-top: 18px; font-size: .85rem; }
.site-footer__legal p { margin: 0 0 4px; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }

.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 560px; margin: 0 auto; background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-l); padding: 18px 20px; box-shadow: 0 18px 40px rgba(26,26,26,.18); font-size: .93rem; }
.cookie-banner__actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.error-page { padding: clamp(48px, 9vw, 120px) 0; }
.error-page__code { font-family: var(--serif); font-size: 5rem; line-height: 1; color: var(--sand); margin: 0 0 12px; }

/* ── Юридические документы ────────────────────────── */
.legal { padding: clamp(28px, 5vw, 56px) 0 72px; }
.legal .prose { font-size: 1rem; }
.legal h2 { font-size: 1.3rem; }
.legal-draft { background: #f6ecd9; color: var(--gold-deep); border-radius: var(--radius-m); padding: 14px 18px; margin-bottom: 28px; max-width: var(--measure); }

/* ── Админка ──────────────────────────────────────── */
.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; background: #f6f3ee; }
.admin__side { background: var(--forest-night); color: var(--on-forest-2); padding: 22px 16px; }
.admin__side .brand__name { color: var(--on-forest); }
.admin__side nav { display: grid; gap: 2px; margin-top: 26px; }
.admin__side nav a { color: var(--on-forest-2); text-decoration: none; padding: 9px 12px; border-radius: var(--radius-s); font-weight: 500; }
.admin__side nav a:hover, .admin__side nav a[aria-current="page"] { background: rgba(244,239,230,.08); color: var(--on-forest); }
.admin__main { padding: 28px clamp(16px, 3vw, 40px) 64px; min-width: 0; }
.admin__main h1 { font-size: 1.9rem; }
.admin__main h2 { font-size: 1.35rem; margin-top: 32px; }
.admin__foot { margin-top: 26px; font-size: .88rem; }
.admin__foot a { color: var(--on-forest-2); }
@media (max-width: 860px) { .admin { grid-template-columns: 1fr; } .admin__side nav { grid-auto-flow: column; overflow-x: auto; margin-top: 12px; } }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 8px; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-m); padding: 16px 18px; }
.kpi__value { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; line-height: 1.1; }
.kpi__label { color: var(--ink-3); font-size: .9rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.admin-form { display: grid; gap: 14px; max-width: 900px; }
.admin-card { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-m); padding: 18px 20px; margin-bottom: 14px; }
.inline-form { display: inline; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li::before { content: "○"; margin-right: 8px; color: var(--gold-deep); }
.checklist li.is-done::before { content: "●"; color: var(--forest); }
.tariff-row { display: grid; grid-template-columns: 1.3fr .8fr .9fr; gap: 10px; }
.tariff-flags { display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (max-width: 760px) { .tariff-row { grid-template-columns: 1fr; } }

/* Конструктор теста */
.builder { display: grid; gap: 18px; }
.builder__q { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-m); padding: 16px 18px; }
.builder__q header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.builder__opt { display: grid; grid-template-columns: minmax(0, 1fr) 190px 80px 36px; gap: 8px; margin-bottom: 8px; align-items: center; }
.builder__scale { display: grid; grid-template-columns: 110px minmax(0, 1fr) 36px; gap: 8px; margin-bottom: 8px; }
.builder__result { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-m); padding: 16px 18px; }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--sand); border-radius: var(--radius-s); background: var(--white); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.icon-btn:hover { border-color: var(--danger); color: var(--danger); }
.sticky-save { position: sticky; bottom: 0; background: #f6f3ee; padding: 14px 0; border-top: 1px solid var(--sand); display: flex; gap: 12px; align-items: center; }
@media (max-width: 760px) { .builder__opt { grid-template-columns: 1fr 1fr; } }
