/* Шрифты лежат у себя (static/fonts, лицензии OFL рядом): переменные woff2 по наборам знаков, как их отдаёт Google Fonts; latin-ext нужен для ₸ и ₽. */
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 300 600; font-display: swap; src: url("../fonts/geologica-cyrillic.2c8a4089a2fe.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 300 600; font-display: swap; src: url("../fonts/geologica-latin-ext.289a4a0e97ea.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 300 600; font-display: swap; src: url("../fonts/geologica-latin.e4c4c9b74c7e.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("../fonts/cormorant-cyrillic.4aee584e576a.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("../fonts/cormorant-latin-ext.b51805d9eab0.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("../fonts/cormorant-latin.65fe45813c40.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500 600; font-display: swap; src: url("../fonts/cormorant-italic-cyrillic.051aeca43435.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500 600; font-display: swap; src: url("../fonts/cormorant-italic-latin-ext.06c33d4664f0.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500 600; font-display: swap; src: url("../fonts/cormorant-italic-latin.2721f7f2ea61.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Вариант C «Мягкая пастель».
   Композиция прежняя (цветные обложки и секции), палитра переведена в природную пастель с тёплым тёмным текстом.
   Шрифты: Geologica (текст 300, заголовки 500), Cormorant (курсив для девиза и прямой речи, цифры состава).
   Кнопки: тёмная олива. Мотив: руккола.
   Рисунки: img/theme-c/botanica.svg (набор линейных рисунков: #rk, #rk2, #sprig, #m-pelvic, #m-iron, #m-weight, #m-cabbage, #wreath),
   в разметке <svg class="ink ..."><use href="img/theme-c/botanica.svg#rk"/></svg>; leaf*.svg и sprig.svg красятся через mask.
   Движение собрано в конце файла, всё под prefers-reduced-motion: no-preference. */

:root {
  --c-ink: #3a2a21;
  --c-ink-2: #5e4b3f;
  --c-ink-3: #6d594c;
  --c-line: rgba(58, 42, 33, 0.14);
  --bg: #faf5ec;
  --surface: #fffdf8;
  --soft: #f1e8d9;
  --sand: #efe3cf;
  --olive: #414d2c;
  --rose: #f0d3cb;
  --peach: #f5d9bb;
  --arugula: #cddbb7;
  --butter: #f0e4b4;
  /* старые имена, на которых держатся styles.css и shop.css */
  --plum: var(--olive);
  --plum-dark: var(--c-ink);
  --beet: #9a5230;
  --green: #4f6b38;
  --lime: #dbe6c2;
  --lime-ink: #2f3a1c;
  --sage: #dfe7cd;
  --lilac: #e3daea;
  --caution-bg: #f6e7c4;
  --ok: var(--green);
  --free: var(--green);
  --free-ink: var(--surface);
  --overlay: rgba(58, 42, 33, 0.42);

  --tint: var(--sand);
  --tint-ink: var(--c-ink);
  --pop: var(--olive);
  --pop-ink: var(--surface);
  --deep: #3d5a2a; /* насыщенный тон поверхности: цифры, лист, линия у прямой речи */
  --stat: var(--deep);

  --font-display: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: "Cormorant", "Bona Nova", Georgia, serif;

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 26px;
  --shadow-pop: 0 20px 56px rgba(58, 42, 33, 0.18);
  --ease-draw: cubic-bezier(0.65, 0, 0.35, 1); /* рисование линии: плавный разгон и остановка */
  --leaf: url("../img/theme-c/leaf.3aa191ee74fe.svg");
  --leaf-solid: url("../img/theme-c/leaf-solid.05b3fa2ac4b9.svg");
}

.tint-pelvic { --tint: var(--rose); --deep: #8a4648; }
.tint-iron { --tint: var(--peach); --deep: #8c4a1f; }
.tint-weight { --tint: var(--arugula); --deep: #3d5a2a; }
.tint-cabbage { --tint: var(--butter); --deep: #6a5716; }
.tint-sage { --tint: var(--sage); --deep: #3d5a2a; }
.tint-lilac, .free-band { --tint: var(--lilac); --deep: #5a4878; }
.tint-pelvic, .tint-iron, .tint-weight, .tint-cabbage, .tint-sage, .tint-lilac, .free-band { --tint-ink: var(--c-ink); --pop: var(--olive); --pop-ink: var(--surface); }

.site-header, .site-footer, .hero, .product-hero, header.page-head, .course-card, .price-box.is-tinted, .buy-strip, .buy-bar, .section[class*="tint-"], .free-band { --stat: var(--deep); }
/* блок цены в цветном первом экране: кремовая карточка вместо тёмной плашки */
.product-hero .price-box, .section[class*="tint-"] .price-box.is-tinted:not([class*="tint-"]) {
  --ink: var(--c-ink); --ink-2: var(--c-ink-2); --ink-3: var(--c-ink-3); --line: var(--c-line);
  --btn: var(--olive); --btn-ink: var(--surface); --focus: var(--olive); --stat: var(--deep);
  background: var(--surface);
}
/* шапка одного цвета с первым экраном страницы */
body:has(main.tint-pelvic, #course-open.tint-pelvic) { --page-tint: var(--rose); }
body:has(main.tint-iron, #course-open.tint-iron) { --page-tint: var(--peach); }
body:has(main.tint-weight, #course-open.tint-weight) { --page-tint: var(--arugula); }
body:has(main.tint-cabbage, #course-open.tint-cabbage) { --page-tint: var(--butter); }
body:has(main.tint-sage, #course-open.tint-sage) { --page-tint: var(--sage); }
body:has(main.tint-lilac, #course-open.tint-lilac) { --page-tint: var(--lilac); }
.site-header { --tint: var(--page-tint, var(--sand)); --tint-ink: var(--c-ink); --pop: var(--olive); --pop-ink: var(--surface); }
.site-footer { --tint: #eadcc5; --tint-ink: var(--c-ink); --pop: var(--olive); --pop-ink: var(--surface); }

/* Типографика: средние начертания, спокойные размеры */
body { font-weight: 300; line-height: 1.6; }
h1, h2, h3 { font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5.6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.25rem); }
h3 { font-size: 1.1875rem; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
b, strong { font-weight: 500; }
.lead { font-size: clamp(1.125rem, 2.2vw, 1.25rem); line-height: 1.5; font-weight: 400; }
.voice { position: relative; max-width: 28ch; padding: 32px 0 0; border-left: 0; font: italic 500 clamp(1.5rem, 3.4vw, 2rem)/1.2 var(--font-accent); }
.text-link { text-decoration-thickness: 1px; }

.section-head .sticker, .section-head .product-kind { color: var(--c-ink); }
/* разделитель секций: волосяная линия с веточкой */
.section + .section:not([class*="tint-"]) > .split::before { height: 22px; background: url("../img/theme-c/sprig.86a422df9773.svg") left center / 44px 22px no-repeat, linear-gradient(var(--line), var(--line)) 56px center / 100% 1px no-repeat; }

/* Кнопки */
.btn { min-height: 52px; padding: 14px 28px; border-width: 1.5px; font-weight: 500; font-size: 1rem; }
.btn-ghost { border-color: color-mix(in srgb, var(--ink) 32%, transparent); }
.more { font-weight: 500; }

/* Ярлыки: кремовая пилюля с листом, без наклона */
.sticker, .product-kind, .badge-free { padding: 6px 14px; background: var(--surface); color: var(--c-ink); font-weight: 400; transform: none; }
.sticker:not(a)::before, .product-kind:not(:has(.badge-free))::before, .account .course-card-meta::before {
  content: ""; display: inline-block; width: 9px; height: 18px; margin: -4px 7px -4px 0; vertical-align: middle; rotate: 18deg;
  background: var(--deep); -webkit-mask: var(--leaf-solid) center / contain no-repeat; mask: var(--leaf-solid) center / contain no-repeat;
}
.sticker.is-white { background: var(--surface); color: var(--c-ink); }
.badge-free, .guide-card .badge-free { background: var(--olive); color: var(--surface); transform: none; }
.chips li, .chips a { border-width: 1px; border-color: color-mix(in srgb, var(--ink) 30%, transparent); font-weight: 400; }
.account .course-card-meta { background: var(--surface); color: var(--c-ink); font-weight: 400; transform: none; }

/* Цифры состава: антиква, спокойный размер */
.stats li { border-top-width: 1px; gap: 6px; }
.stats b { font: 500 clamp(2.5rem, 8vw, 3.25rem)/1 var(--font-accent); letter-spacing: 0; font-variant-numeric: lining-nums; }
.stats b small { font: 400 0.4em/1 var(--font-text); letter-spacing: 0; }

/* Шапка и подвал */
.logo { font: italic 600 1.625rem/1.75rem var(--font-accent); letter-spacing: 0; }
.site-nav a, .site-account { font-weight: 400; }
.site-account { border-width: 1px; }
.site-footer .logo { font-size: clamp(1.875rem, 6vw, 2.5rem); }
.footer-motto { font: italic 500 1.375rem/1.3 var(--font-accent); color: var(--deep); }

/* Первый экран главной: портрет в арке, за ней листья */
.hero h1 { font-size: clamp(2rem, 10cqi, 3.5rem); line-height: 1.06; }
.hero-text { font-size: clamp(1.0625rem, 2.2vw, 1.1875rem); line-height: 1.5; max-width: 32ch; }
.hero-portrait { border-radius: 0 0 var(--radius-l) var(--radius-l); }
/* арка как керамическая тарелка: светлый бортик и тонкая тень под ним */
.hero-portrait::before { inset: 15% 3% 0; border-radius: 999px 999px var(--radius-l) var(--radius-l); background: var(--arugula); box-shadow: inset 0 0 0 9px #d9e4c6, inset 0 0 0 10px rgba(61, 90, 42, 0.16); }
/* тёплый свет с тенью листвы: готовая картинка, рисуется один раз */
.hero { background-image: url("../img/theme-c/shade.2075104d3db5.svg"); background-repeat: no-repeat; background-position: right -60px top -30px; background-size: min(110vw, 620px); }
.hero-visual .ink { opacity: 0.55; transform-origin: 50% 100%; }
.hero-visual .leaf-a { right: -10%; top: 0; width: 27%; rotate: 26deg; }
.hero-visual .leaf-b { left: -13%; bottom: 3%; width: 20%; rotate: -34deg; }
.hero-visual .leaf-c { left: 3%; top: 9%; width: 12%; rotate: -16deg; opacity: 0.4; }
.hero-visual .sticker.is-lilac { left: -6%; top: 50%; transform: rotate(-4deg); background: var(--peach); font: italic 600 clamp(1.125rem, 3vw, 1.375rem)/1.2 var(--font-accent); padding: 7px 18px; }
.hero-visual .sticker.is-lilac::before { content: none; }
.hero-visual a.sticker { right: -4%; bottom: 12%; transform: rotate(3deg); padding: 12px 18px; }
.topics { border-top-width: 1px; }

/* Обложки курсов */
.course-card { min-height: 280px; gap: 10px; }
.course-card::before {
  inset: 7px; width: auto; aspect-ratio: auto; border-radius: calc(var(--radius-l) - 7px);
  border: 1px solid color-mix(in srgb, var(--deep) 17%, transparent); background: none; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}
.course-card.is-wide::before { inset: 7px; width: auto; }
.motif { right: 18px; top: 16px; width: clamp(72px, 30%, 112px); aspect-ratio: 1; opacity: 0.6; z-index: -1; transition: transform 600ms var(--ease-out); }
.course-card-meta { font-weight: 400; }
.course-card h3 { margin-top: 12px; max-width: 78%; font-size: clamp(1.5rem, 8.5cqi, 2rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.price-inline { font: 500 1.375rem/1 var(--font-display); letter-spacing: -0.01em; }

/* Бесплатные гайды */
.guide-card h3 { font-size: clamp(1.3125rem, 3vw, 1.5rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.15; }
.guide-cover { --cover: var(--peach); color: var(--c-ink); box-shadow: 6px 6px 0 color-mix(in srgb, var(--c-ink) 9%, transparent); transform: rotate(-3deg); outline: 1px solid color-mix(in srgb, var(--c-ink) 15%, transparent); outline-offset: -5px; }
.guide-cover.is-green { --cover: var(--arugula); }
.guide-cover::before { background: color-mix(in srgb, var(--c-ink) 14%, transparent); width: 1px; }
.guide-cover::after { right: 2%; bottom: -12%; width: 36%; aspect-ratio: 1 / 2; border-radius: 0; rotate: 20deg; background: var(--c-ink); opacity: 0.3; -webkit-mask: var(--leaf) center / contain no-repeat; mask: var(--leaf) center / contain no-repeat; }
.guide-cover b { font: 500 1rem/1.1 var(--font-display); letter-spacing: -0.01em; }
.guide-cover small { font: italic 600 0.875rem/1.2 var(--font-accent); }

/* Строки услуг */
.offer-list, .numbered { border-top: 1px solid var(--line); }
.offer h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.15; text-decoration-thickness: 1px; }
.offer-price { font: 500 1.375rem/1.1 var(--font-display); letter-spacing: -0.01em; }
.offer-price small { font-weight: 300; }

/* Страница продукта */
.product-hero h1 { font-size: clamp(1.875rem, 9.5cqi, 3.5rem); line-height: 1.06; }
.product-hero .lead { max-width: 32ch; }
.episodes b { font: 500 2.5rem/1 var(--font-accent); letter-spacing: 0; font-variant-numeric: lining-nums; }
.episodes b small { font: 400 0.4em/1 var(--font-text); letter-spacing: 0; }
.episodes li::before { font-weight: 400; }

/* рисунок по теме в первом экране продукта (svg в разметке); у шапки кабинета и документов лист */
.product-hero, header.page-head { position: relative; isolation: isolate; }
.hero-motif { right: var(--pad); top: 12px; width: 34px; rotate: 18deg; z-index: -1; opacity: 0.6; }
.hero-motif.motif { width: 54px; rotate: none; }
header.page-head::after {
  content: ""; position: absolute; z-index: -1; right: 28px; top: 6px; width: 40px; aspect-ratio: 1 / 2; rotate: 24deg; pointer-events: none;
  background: var(--deep); opacity: 0.3; -webkit-mask: var(--leaf) center / contain no-repeat; mask: var(--leaf) center / contain no-repeat;
}

/* Цена */
.price { font: 500 2rem/1.05 var(--font-display); letter-spacing: -0.02em; }
.price small { font-weight: 300; }
.product-hero .price-box .price { font-size: clamp(1.875rem, 11cqi, 2.5rem); }
.price-box.is-tinted { padding: clamp(24px, 5vw, 44px); }
.price-box.is-tinted .price { font-size: clamp(2rem, 12cqi, 3rem); }
.price-box h2 { font-size: clamp(1.5rem, 7cqi, 2.125rem); }
.price-label { font-weight: 400; }
.price-includes { font-weight: 400; }
.buy-strip h3 { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; }
.buy-strip .price { font-size: 1.75rem; }
.buy-bar { box-shadow: 0 -6px 20px rgba(58, 42, 33, 0.1); }
.buy-bar p { font: 500 1.125rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.buy-bar p span { font-weight: 300; }

/* Списки */
.numbered li { padding-left: 60px; }
.numbered li::before { top: 22px; display: grid; place-items: center; width: 40px; height: 40px; padding-bottom: 3px; border: 1px solid color-mix(in srgb, var(--deep) 38%, transparent); border-radius: 50%; font: 500 1.5rem/1 var(--font-accent); letter-spacing: 0; font-variant-numeric: lining-nums; }
.inside-list h3, .numbered h3 { font-size: 1.125rem; }
.numbered-meta { font-weight: 400; }
.caution h3 { font-size: 1.0625rem; }

/* Окно оплаты, кабинет, курс (shop.css) */
.shop h2 { font-size: 1.5rem; }
.shop-product { font-weight: 400; }
.shop-choice button { font-weight: 400; }
.notice h1, .notice h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.account .course-card { min-height: 200px; }
.account .motif { width: 72px; }
.stage p { font: 500 clamp(1.125rem, 3vw, 1.5rem)/1.2 var(--font-display); letter-spacing: -0.01em; }
.stage-doc { border-width: 1px; }
.lesson h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); }
.lesson-list button { font-weight: 300; }
.lesson-list button[aria-current] { font-weight: 400; }
.done-toggle { font-weight: 400; }

@media (max-width: 719.98px) {
  .logo { font-size: 1.5rem; }
}
@media (max-width: 559.98px) {
  .guide-cover { box-shadow: 4px 4px 0 color-mix(in srgb, var(--c-ink) 9%, transparent); }
  .guide-cover b { font-size: 0.6875rem; }
  .guide-cover small { font-size: 0.6875rem; }
}
@media (min-width: 900px) {
  .course-card { min-height: 360px; }
  .course-card.is-wide { min-height: 0; }
  .course-card.is-wide .motif { right: 24%; top: 50%; width: 104px; margin-top: -52px; }
  .course-card.is-wide h3 { font-size: 2.25rem; max-width: none; }
  .course-card.is-wide .price-inline { font-size: 1.75rem; }
  .split h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
  .hero-motif { right: 39%; top: 6%; width: 64px; }
  .hero-motif.motif { right: 40%; top: 5%; width: clamp(104px, 10vw, 136px); }
  header.page-head::after { right: 8%; top: 12%; width: 64px; }
}

/* ===== Детали: рисунки, бумага, мягкие границы ===== */

/* линейный рисунок из botanica.svg; цвет и толщина наследуются внутрь <use> */
.ink { position: absolute; aspect-ratio: 1 / 2; overflow: visible; pointer-events: none; fill: none; stroke: var(--deep); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.motif, .wreath { aspect-ratio: 1; }

/* бумага: мелкое зерно плиткой 240 px, только на светлом фоне */
body { background-image: url("../img/theme-c/paper.2b0c27b8ab21.svg"); background-size: 240px; }

/* мягкая граница между поверхностями: следующий блок поднимается пологой волной своего цвета */
.hero + .section, .product-hero + .section, .free-band, .section[class*="tint-"], .free-band + .section, .section[class*="tint-"] + .section, .site-footer { position: relative; }
:is(.hero + .section, .product-hero + .section, .free-band, .section[class*="tint-"], .free-band + .section, .section[class*="tint-"] + .section, .site-footer)::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 18px; pointer-events: none; background: var(--cap, var(--bg));
  -webkit-mask: url("../img/theme-c/wave.fcf936cf18dd.svg") center / max(100%, 720px) 100% no-repeat; mask: url("../img/theme-c/wave.fcf936cf18dd.svg") center / max(100%, 720px) 100% no-repeat;
}
.free-band, .section[class*="tint-"], .site-footer { --cap: var(--tint); }

/* прямая речь: веточка над цитатой */
.voice::before { content: ""; position: absolute; left: -2px; top: 0; width: 48px; height: 24px; background: var(--deep); opacity: 0.75; -webkit-mask: url("../img/theme-c/sprig.86a422df9773.svg") center / contain no-repeat; mask: url("../img/theme-c/sprig.86a422df9773.svg") center / contain no-repeat; }

/* «что внутри» и состав цены: буллеты-листики */
.inside-list li { position: relative; padding-left: 54px; }
.inside-list li::before, .price-includes li::before, .caution h3::before {
  content: ""; position: absolute; left: 24px; top: 19px; width: 13px; height: 26px; rotate: 24deg;
  background: var(--deep); -webkit-mask: var(--leaf-solid) center / contain no-repeat; mask: var(--leaf-solid) center / contain no-repeat;
}
.price-includes li { position: relative; padding-left: 26px; }
.price-includes li::before { left: 4px; top: 12px; width: 9px; height: 18px; }

/* предупреждение: крафтовый ярлык с прошитым краем */
.caution { outline: 1px dashed color-mix(in srgb, var(--c-ink) 30%, transparent); outline-offset: -7px; padding: 26px; }
.caution h3 { position: relative; padding-left: 20px; }
.caution h3::before { left: 0; top: -1px; width: 10px; height: 20px; background: #8a6a1c; }

/* цена: карточка лежит на поверхности; большой блок цены с тиснёной рамкой */
.product-hero .price-box { box-shadow: 0 14px 30px -20px rgba(58, 42, 33, 0.4); }
.price-box.is-tinted { outline: 1px solid color-mix(in srgb, var(--deep) 17%, transparent); outline-offset: -8px; }

/* листик у «Подробнее» и у главной кнопки первого экрана */
.more::after, .hero-actions .btn-primary::after {
  content: ""; flex: none; display: inline-block; width: 7px; height: 14px; margin-left: 9px; vertical-align: -2px; rotate: 40deg;
  background: currentColor; opacity: 0.85; -webkit-mask: var(--leaf-solid) center / contain no-repeat; mask: var(--leaf-solid) center / contain no-repeat;
  transition: transform 320ms var(--ease-out);
}

/* подвал: веточка над логотипом */
.foot-sprig { position: static; display: block; width: 30px; margin: -26px 0 -4px 14px; rotate: 82deg; opacity: 0.6; transform-origin: 50% 100%; }

/* пустые состояния и заглушка урока */
.notice { position: relative; overflow: hidden; }
.notice-art { right: 22px; top: 14px; width: 34px; rotate: 14deg; opacity: 0.45; }
.notice h1, .notice h2 { max-width: calc(100% - 48px); }
.stage-art { right: -5%; top: 50%; width: min(36%, 170px); translate: 0 -50%; aspect-ratio: 1; opacity: 0.2; }
.stage p { position: relative; }

/* «Доступ открыт»: венок из двух веточек вокруг галочки */
.shop-ok { position: relative; width: 96px; height: 96px; margin-left: -6px; background: none; }
.shop-ok span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); }
.shop-ok .wreath { inset: 0; width: 100%; stroke: var(--green); stroke-width: 1.6; }

@media (max-width: 719.98px) {
  .hero { background-position: right -80px top 34%; }
  :is(.hero + .section, .product-hero + .section, .free-band, .section[class*="tint-"], .free-band + .section, .section[class*="tint-"] + .section, .site-footer)::before { height: 12px; }
}
@media (min-width: 900px) {
  .motif { right: 22px; top: 20px; }
}

/* ===== Движение ===== */
@media (hover: hover) and (pointer: fine) {
  .course-card:hover { transform: translateY(-3px); }
  .course-card:hover .motif { transform: rotate(-5deg) scale(1.05); }
  .course-card:hover .more::after, .guide-card:hover .more::after, .hero-actions .btn-primary:hover::after { transform: translate(2px, -1px) rotate(-16deg); }
}
/* нажатие на телефоне: тот же отклик, что и наведение */
.course-card:active .motif { transform: rotate(-5deg) scale(1.05); }
.course-card:active .more::after, .guide-card:active .more::after, .hero-actions .btn-primary:active::after { transform: translate(2px, -1px) rotate(-16deg); }

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(root) { animation-duration: 260ms; }

  @keyframes draw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
  @keyframes sway { 25% { transform: rotate(var(--sway)); } 75% { transform: rotate(calc(var(--sway) * -1)); } }
  @keyframes grow { from { clip-path: inset(100% 0 0); } to { clip-path: inset(0); } }
  @keyframes tick { from { opacity: 0; transform: rotate(45deg) scale(0.4); } }

  /* первый экран: текст (0-100 мс), арка вырастает, портрет проявляется, листья дорисовываются, ярлыки. Около 1,2 с, ничего не блокирует */
  .hero-portrait { animation: none; }
  .hero-portrait::before { animation: grow 900ms var(--ease-out) 80ms backwards; }
  .hero-portrait img { animation: rise 700ms var(--ease-out) 240ms backwards; }
  .hero-visual .sticker { animation-delay: 620ms; }
  .hero-visual a.sticker { animation-delay: 700ms; }
  /* листья у портрета: рисуются, потом едва покачиваются; качание запускает app.js, пока первый экран виден */
  .hero-visual .ink { --sway: 1.6deg; animation: draw 1300ms var(--ease-draw) 450ms backwards, sway 9s ease-in-out 1800ms infinite; animation-play-state: running, paused; }
  .hero-visual .leaf-b { animation-delay: 600ms, 2600ms; animation-duration: 1300ms, 11s; }
  .hero-visual .leaf-c { animation-delay: 750ms, 3200ms; animation-duration: 1100ms, 13s; }
  .foot-sprig.is-in { --sway: 1.6deg; animation: draw 1100ms var(--ease-draw) 150ms backwards, sway 10s ease-in-out 1300ms infinite; animation-play-state: running, paused; }
  .hero-visual .ink.is-live, .foot-sprig.is-live { animation-play-state: running, running; }

  /* рисунки дорисовываются, когда блок появился: класс is-in ставит app.js */
  .is-in .ink, .hero-motif, .stage-art, .notice-art { animation: draw 1100ms var(--ease-draw) 220ms backwards; }
  .shop-ok .wreath { animation: draw 900ms var(--ease-draw) 240ms backwards; }
  .is-done .lesson-mark::after { animation: tick 260ms var(--ease-out); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 719.98px) {
  .hero-visual .ink, .foot-sprig.is-in { --sway: 0.9deg; }
}
@media (prefers-reduced-motion: reduce) {
  .motif, .more::after, .hero-actions .btn-primary::after { transition: none; }
  .course-card:hover .motif, .course-card:active .motif { transform: none; }
}

/* Подвал: бренд, три колонки ссылок на разделы, внизу строка с документами. Тень листа как на первом экране */
.site-footer { padding-block: 52px calc(8px + env(safe-area-inset-bottom)); background: var(--tint) url("../img/theme-c/foot-leaf.f8500e65aae3.svg") right 4px bottom / clamp(170px, 40vw, 320px) auto no-repeat; } /* тень листа как на первом экране; фон не выходит за границы блока */
.site-footer .wrap { position: relative; z-index: 1; }
.site-footer .wrap.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; align-items: start; }
.foot-brand { grid-column: 1 / -1; display: grid; justify-items: start; gap: 4px; }
.foot-role { margin-top: 6px; font-size: 0.9375rem; color: var(--ink-2); }
.foot-ig { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; padding-inline: 18px; border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: 0.9375rem; color: var(--ink); text-decoration: none; transition: background-color var(--dur) ease, transform var(--dur-fast) ease; }
.foot-ig:active { transform: scale(0.97); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.foot-col { display: grid; align-content: start; }
/* телефон: «Курсы» и «Личная работа» парой, короткая «Бесплатно» отдельной строкой ниже */
.foot-grid > :nth-child(3) { order: 3; grid-column: 1 / -1; }
.foot-grid > :nth-child(4) { order: 2; }
.foot-title { margin-bottom: 2px; font: italic 600 1.375rem/1.2 var(--font-accent); color: var(--deep); }
.foot-col a, .foot-bottom a { display: flex; align-items: center; min-height: 44px; font-size: 0.9375rem; line-height: 1.3; color: var(--ink); text-decoration: none; }
.site-footer .wrap.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 24px; margin-top: 24px; }
.foot-bottom::before { content: ""; flex-basis: 100%; border-top: 1px dashed color-mix(in srgb, var(--ink) 30%, transparent); } /* линия по ширине текста, а не всего .wrap */
.foot-bottom p { padding-block: 12px; font-size: 0.8125rem; color: var(--ink-2); }
.foot-bottom nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot-bottom a { font-size: 0.8125rem; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .foot-col a:hover, .foot-bottom a:hover { color: var(--deep); text-decoration: underline; text-underline-offset: 4px; }
  .foot-ig:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
}
@media (min-width: 640px) {
  .site-footer .wrap.foot-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-grid > :nth-child(3), .foot-grid > :nth-child(4) { order: 0; grid-column: auto; }
}
@media (min-width: 960px) {
  .site-footer { padding-block-start: 72px; }
  .site-footer .wrap.foot-grid { grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px 40px; }
  .foot-brand { grid-column: auto; }
}

/* Шапка закреплена на всех экранах и не прячется; якоря и список уроков отступают на её высоту (94 px на телефоне, 76 на десктопе) */
.site-header { position: sticky; top: 0; z-index: 4; }
[id], .lesson { scroll-margin-top: 104px; }
@media (min-width: 900px) { .lesson-nav { top: 100px; } }

/* Портрет внутри рамки-арки: низ и бока обрезаны её контуром, голова и волосы выходят выше, тень отделяет фигуру от арки */
.hero-portrait { overflow: visible; border-radius: 0; }
.hero-portrait::before { box-shadow: inset 0 0 0 9px #d9e4c6, inset 0 0 0 10px rgba(61, 90, 42, 0.16), 0 18px 30px -14px rgba(61, 90, 42, 0.32); }
.hero-portrait img {
  clip-path: inset(-30% 3% 0 3% round 0 0 var(--radius-l) var(--radius-l));
  filter: drop-shadow(0 8px 10px rgba(52, 68, 33, 0.22)) drop-shadow(0 22px 26px rgba(52, 68, 33, 0.14));
}
/* передний бортик арки поверх фигуры, только в нижней части: фигура стоит внутри рамки, а не лежит на ней */
.hero-portrait::after {
  content: ""; position: absolute; inset: 15% 3% 0; z-index: 2; pointer-events: none; border-radius: 999px 999px var(--radius-l) var(--radius-l);
  box-shadow: inset 0 0 0 9px #d9e4c6, inset 0 0 0 10px rgba(61, 90, 42, 0.16);
  -webkit-mask: linear-gradient(#0000 55%, #000 72%); mask: linear-gradient(#0000 55%, #000 72%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-portrait::after { animation: grow 900ms var(--ease-out) 80ms backwards; }
}

/* Подвал: логотип на уровне заголовков колонок, веточка над ним вне потока */
.foot-brand { position: relative; }
.foot-sprig { position: absolute; top: -56px; left: 14px; margin: 0; }
/* радиусы арки в долях: верх остаётся полукругом (50% / 41.5% при пропорциях рамки), нижние углы 26 px совпадают с обрезкой фото */
.hero-portrait::before, .hero-portrait::after { border-radius: 50% 50% var(--radius-l) var(--radius-l) / 41.5% 41.5% var(--radius-l) var(--radius-l); }

/* ярлыки поверх переднего бортика арки (иначе бортик перерезает «@zarina_the_fit») */
.hero-visual .sticker { z-index: 3; }

/* ===== Шапка: тонкая, на всю ширину; вверху цвета страницы, после прокрутки бумажная; на телефоне одна строка с меню ===== */
.site-header {
  position: sticky; top: 0; z-index: 6; display: block; margin: 0; padding: env(safe-area-inset-top) 0 0;
  box-shadow: 0 1px 0 transparent; clip-path: none; background: var(--tint);
  transition: background-color 220ms ease, box-shadow 220ms ease;
}
.site-header.is-scrolled { background: #f8f1e4; box-shadow: 0 1px 0 rgba(58, 42, 33, 0.1), 0 8px 20px -14px rgba(58, 42, 33, 0.22); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 93%, transparent); -webkit-backdrop-filter: blur(10px) saturate(1.05); backdrop-filter: blur(10px) saturate(1.05); }
}
.site-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; min-height: 56px; }
.site-bar .logo { margin-right: auto; padding-block: 0; font-size: 1.5rem; }
.site-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; width: 100%; padding-bottom: 6px; }
.site-nav { order: 0; width: auto; gap: 20px; flex-wrap: wrap; }
.site-nav a { padding-block: 11px; }
.site-account { order: 0; }
.menu-btn { display: none; }
[id], .lesson { scroll-margin-top: 76px; }

@media (max-width: 719.98px) { .site-header:not(.has-menu) { position: static; } } /* без скрипта двухстрочная шапка не липнет */
/* телефон с работающим скриптом: кнопка «Меню» и лист под шапкой */
@media (max-width: 719.98px) {
  .has-menu .menu-btn {
    position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-right: -8px; padding: 0 12px;
    border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font-size: 0.9375rem; font-family: inherit; cursor: pointer;
  }
  .has-menu .menu-btn:focus-visible, .has-menu .site-menu a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .menu-ico path { transition: transform 220ms var(--ease-out, ease-out); transform-box: fill-box; transform-origin: center; }
  .menu-btn[aria-expanded="true"] .l1 { transform: translateY(3px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .l2 { transform: translateY(-3px) scaleX(1.5) rotate(-45deg); }
  .has-menu .menu-btn.has-access::after { content: ""; position: absolute; top: 9px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--free); }
  .has-menu .site-menu {
    position: absolute; top: calc(100% + 6px); left: 12px; right: 12px; z-index: 1; display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: auto;
    max-height: calc(100dvh - 56px - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 8px;
    border: 1px solid var(--c-line); border-radius: 20px; background: var(--surface); box-shadow: 0 18px 40px -16px rgba(58, 42, 33, 0.35);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transform-origin: top right;
    transition: opacity 220ms ease, transform 220ms var(--ease-out, ease-out), visibility 0s linear 220ms;
  }
  .has-menu .site-menu.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .has-menu .site-nav { flex-direction: column; gap: 0; }
  .has-menu .site-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 12px; font-size: 1.0625rem; }
  .has-menu .site-nav a:active { background: color-mix(in srgb, var(--c-ink) 7%, transparent); }
  .has-menu .site-menu .site-account { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 4px; border-color: var(--olive); background: var(--olive); color: var(--surface); font-size: 1.0625rem; }
  .has-menu .site-menu .site-account.has-access::after { background: var(--surface); }
}

@media (min-width: 720px) {
  .site-bar { flex-wrap: nowrap; min-height: 64px; }
  .site-bar .logo { font-size: 1.625rem; }
  .site-menu { display: contents; }
  .site-nav { gap: 32px; flex-wrap: nowrap; }
  .site-nav a { padding-block: 12px; font-size: 1rem; }
  .site-account { font-size: 1rem; }
  [id], .lesson { scroll-margin-top: 84px; }
  .lesson-nav { top: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .has-menu .site-menu, .menu-ico path { transition: none; }
}

/* ===== Страница уроков (course.html) ===== */
/* спокойная страница: цвет курса в шапке и рамке заглушки, один акцент (листик у текущего урока), остальное по делу */
header.page-head:has(.course-resume)::after { content: none; }
.page-head .lead { color: var(--c-ink-2); }
.course-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--deep) 16%, transparent); }
.course-bar i { border-radius: 3px; background: var(--olive); }
.lesson-nav-toggle { border-color: var(--c-line); }
.lesson-list button[aria-current] { background: var(--surface); box-shadow: 0 0 0 1px var(--c-line); }
.lesson-list .is-done:not([aria-current]) { color: var(--c-ink-2); }
.is-done .lesson-mark { border-color: var(--olive); background: var(--olive); }
.lesson-list [aria-current]:not(.is-done) .lesson-mark { border-color: var(--deep); }
.lesson-list [aria-current]:not(.is-done) .lesson-mark::after { content: ""; width: 6px; height: 12px; rotate: 24deg; background: var(--deep); -webkit-mask: var(--leaf-solid) center / contain no-repeat; mask: var(--leaf-solid) center / contain no-repeat; }
.lesson-chips span { background: color-mix(in srgb, var(--tint) 55%, var(--surface)); color: var(--c-ink); }

/* заглушка медиа: нейтральная рамка в тоне курса и короткая подпись */
.stage { position: relative; display: grid; place-items: center; align-content: center; gap: 16px; overflow: hidden; aspect-ratio: 16 / 9; padding: 20px; border-radius: var(--radius-l); background: color-mix(in srgb, var(--tint) 45%, var(--surface)); box-shadow: inset 0 0 0 1px var(--c-line); text-align: center; }
.stage p { position: relative; z-index: 1; display: grid; gap: 4px; }
.stage b { font: 500 1rem/1.3 var(--font-text); color: var(--c-ink); }
.stage span { font-size: 0.9375rem; color: var(--c-ink-2); }
.stage-audio, .stage-doc { aspect-ratio: auto; min-height: 120px; padding: 28px 20px; }
.stage-doc { background: var(--surface); }
.stage-line { width: min(100%, 420px); height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--deep) 22%, transparent); }
/* водяной знак с номером заказа: тихий, диагональный повтор */
.stage-mark { position: absolute; inset: -50%; display: grid; place-content: center; transform: rotate(-20deg); font-size: 0.8125rem; line-height: 4; word-spacing: 3em; text-align: center; color: var(--c-ink); opacity: 0.1; pointer-events: none; user-select: none; }

.course-bar, .done-toggle, .lesson-list button, .lesson-nav-toggle { --focus: var(--olive); }

/* движение страницы уроков: ступенчатое появление списка */
@media (prefers-reduced-motion: no-preference) {
  @keyframes cs-rise { from { opacity: 0; transform: translateY(10px); } }
  .lesson-list li { animation: cs-rise 460ms var(--ease-out) min(calc(var(--i, 0) * 40ms), 400ms) backwards; }
}

/* телефон: кнопка «Все уроки (N)» стоит НАД уроком, чтобы любой урок выбирался сразу, без прокрутки через весь текст текущего; у коротких курсов (до 5 уроков) прежний порядок */
@media (max-width: 899.98px) { .course-layout:has(.lesson-nav:not(.is-short)) > .lesson { order: 0; } }
