/* v17 — блоки ниже утверждённого первого экрана. Порядок: конспекты (подарок сразу) → как проходит подготовка
   (зигзаг со стрелками от руки, как в v15) → программа (обложки слева, блок справа, как в v15) → форматы на один
   экран → запись → контакты → подвал с плашкой Melvi по центру и политикой. Палитра «Медный вечер». */
:root {
  --card: rgb(24 15 11 / 0.88); --card-edge: rgb(247 236 225 / 0.1); --lit-edge: rgb(240 166 116 / 0.5);
  --warm: linear-gradient(140deg, rgb(80 39 23 / 0.97), rgb(38 21 14 / 0.96) 55%, rgb(27 16 11 / 0.96));
}
main { position: relative; z-index: 2; }
.menu a.on { color: var(--ink); box-shadow: 0 2px 0 var(--hl); }
.sec { position: relative; z-index: 2; max-width: 1640px; margin: 0 auto; padding: clamp(80px, 11vh, 118px) var(--pad) 0; scroll-margin-top: 24px; }
h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 4.2vw, 68px); line-height: 1.02; letter-spacing: -0.02em; overflow-wrap: break-word; min-width: 0; }
h3 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; }
.sec-head { max-width: 920px; }
.sec-lead { margin: 18px 0 0; max-width: 33em; font-size: clamp(17px, 1.3vw, 20px); font-weight: 500; line-height: 1.55; color: var(--ink); }
.cta-sm { min-height: 62px; padding-left: 28px; font-size: 16px; gap: 16px; }
.cta-sm i { width: 46px; height: 46px; }
.ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 62px; padding: 0 30px; border-radius: 99px; font-size: 16px; font-weight: 700; box-shadow: inset 0 0 0 1.5px rgb(247 236 225 / 0.5); transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; }
.ghost:hover { background: var(--ink); color: #1a0f0b; box-shadow: inset 0 0 0 1.5px var(--ink); }

/* появление при прокрутке */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 30px, 0); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* --- конспекты: подарок сразу после первого экрана --- */
.gift { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); align-items: center; gap: 40px; min-height: 420px;
  padding: clamp(34px, 4vw, 64px); border-radius: 40px; background: var(--warm); box-shadow: inset 0 0 0 1px rgb(240 166 116 / 0.38), 0 60px 120px -70px rgb(232 146 92 / 0.75); }
.gift-list { list-style: none; margin: 26px 0 30px; padding: 0; display: grid; gap: 10px; }
.gift-list li { display: flex; align-items: baseline; gap: 16px; font-size: 17px; line-height: 1.4; }
.gift-list b { flex: none; min-width: 5.4em; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1; color: var(--hl); }
.gift .sheets { position: relative; height: 340px; animation: float 7s ease-in-out infinite; }
.gift .sheets img { position: absolute; left: 50%; top: 50%; width: 200px; height: auto; margin: -142px 0 0 -100px; border-radius: 10px; box-shadow: 0 26px 50px -18px rgb(0 0 0 / 0.8); transform-origin: 50% 125%; transition: transform 1.2s var(--ease); }
.gift.in .sheets img:nth-child(1) { transform: translateX(-168px) rotate(-15deg); }
.gift.in .sheets img:nth-child(2) { transform: translateX(-58px) rotate(-5deg); transition-delay: 0.06s; }
.gift.in .sheets img:nth-child(3) { transform: translateX(58px) rotate(5deg); transition-delay: 0.12s; }
.gift.in .sheets img:nth-child(4) { transform: translateX(168px) rotate(15deg); transition-delay: 0.18s; }
.gift.in:hover .sheets img:nth-child(1) { transform: translateX(-196px) rotate(-19deg) translateY(-10px); }
.gift.in:hover .sheets img:nth-child(2) { transform: translateX(-68px) rotate(-6deg) translateY(-18px); }
.gift.in:hover .sheets img:nth-child(3) { transform: translateX(68px) rotate(6deg) translateY(-18px); }
.gift.in:hover .sheets img:nth-child(4) { transform: translateX(196px) rotate(19deg) translateY(-10px); }
@keyframes float { 50% { transform: translateY(-8px); } }

/* --- как проходит подготовка: зигзаг и стрелки от руки --- */
.method h2 { margin-bottom: clamp(30px, 4vh, 48px); }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 0.85fr); gap: 0 clamp(30px, 3.4vw, 64px); align-items: start; }
.note { position: relative; z-index: 1; padding: 26px 26px 28px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge), 0 30px 60px -40px rgb(0 0 0 / 0.8); transition: box-shadow 0.4s ease, transform 0.5s var(--ease); }
.note:hover { box-shadow: inset 0 0 0 1px var(--lit-edge), 0 30px 70px -40px rgb(232 146 92 / 0.55); transform: translateY(-4px); }
.note h3 { font-size: clamp(25px, 2.05vw, 34px); }
.note p { margin: 10px 0 0; font-size: 16.5px; line-height: 1.5; color: var(--ink); }
.note.low { margin-top: clamp(70px, 10vh, 120px); }
.goal { position: relative; z-index: 1; margin: clamp(20px, 3vh, 40px) 0 0; padding: 26px 24px 28px; border-radius: 24px; background: var(--cta-i); color: #1a0f0b; box-shadow: 0 30px 70px -30px rgb(232 146 92 / 0.85);
  font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 2.8vw, 46px); line-height: 1; }
.goal span { display: block; margin-top: 10px; font-family: var(--sans); font-size: 15.5px; font-weight: 700; color: rgb(26 15 11 / 0.78); }
.pen { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.pen path { fill: none; stroke: var(--hl); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 700ms cubic-bezier(0.65, 0, 0.35, 1); transition-delay: var(--d, 0ms); }
.steps.drawn .pen path { stroke-dashoffset: 0; }
.keys { list-style: none; margin: clamp(40px, 6vh, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-radius: 26px; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.keys li { padding: 22px 28px 24px; }
.keys li + li { box-shadow: inset 1px 0 0 var(--card-edge); }
.keys b { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 3.6vw, 60px); line-height: 1; color: var(--hl); white-space: nowrap; }
.keys span { display: block; margin-top: 8px; font-size: 15.5px; font-weight: 600; color: var(--ink-2); }

/* --- программа: обложки слева, блок справа --- */
.prog { margin-top: 36px; display: grid; grid-template-columns: minmax(250px, 0.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ptabs { display: grid; gap: 10px; }
.ptab { appearance: none; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 16px; padding: 9px 18px 9px 9px; border-radius: 20px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); transition: box-shadow 0.25s ease, background-color 0.25s ease, transform 0.15s ease-out; }
.ptab img { flex: none; width: 48px; height: 68px; border-radius: 9px; object-fit: cover; }
.ptab span { font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.ptab b { display: block; margin-bottom: 2px; font-size: 17.5px; font-weight: 700; color: var(--ink); }
.ptab:hover { box-shadow: inset 0 0 0 1.5px rgb(240 166 116 / 0.45); }
.ptab.on { background: rgb(52 27 17 / 0.96); box-shadow: inset 0 0 0 2px var(--hl), 0 20px 50px -30px rgb(232 146 92 / 0.75); }
.ptab:active { transform: scale(0.98); }
.ptab:focus-visible { outline: 2px solid var(--hl); outline-offset: 3px; }
.pblocks { min-width: 0; }
.pblock { display: none; grid-template-columns: auto minmax(0, 1fr); gap: 34px; padding: 24px; border-radius: 30px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.pblock.on, html:not(.js) .pblock { display: grid; }
html:not(.js) .pblock + .pblock { margin-top: 12px; }
.pb-cover { display: block; height: clamp(300px, 50vh, 440px); width: auto; aspect-ratio: 527 / 760; border-radius: 16px; box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.85); }
.pb-body { display: flex; flex-direction: column; gap: 16px; padding: 8px 10px 4px 0; min-width: 0; }
.pb-body h3 { font-size: clamp(36px, 3.2vw, 52px); line-height: 1; }
.pb-topics { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 30px; }
.pb-topics li { position: relative; break-inside: avoid; padding: 8px 0 8px 22px; box-shadow: inset 0 -1px 0 var(--card-edge); font-size: 15.5px; line-height: 1.35; color: var(--ink); }
.pb-topics li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 11px; height: 2px; border-radius: 2px; background: var(--hl); }
.pb-topics.few { columns: 1; }
.pb-topics.few li { padding: 10px 0 10px 24px; font-size: 17px; }
.pb-topics i { margin-left: 8px; padding: 2px 9px; border-radius: 99px; font-style: normal; font-size: 12.5px; font-weight: 800; background: rgb(240 166 116 / 0.16); color: var(--hl); }
.pb-tasks { display: grid; gap: 10px; margin-top: auto; }
.pb-tasks p { margin: 0; display: flex; align-items: center; gap: 14px; }
.pb-tasks b { flex: none; width: 64px; font-size: 15px; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips i { display: inline-grid; place-items: center; min-width: 40px; height: 36px; padding: 0 10px; border-radius: 11px; font-style: normal; font-size: 15px; font-weight: 800; background: var(--hl); color: #1a0f0b; }
.chips.oge i { background: transparent; color: var(--hl); box-shadow: inset 0 0 0 1.5px rgb(240 166 116 / 0.6); }
.pb-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgb(240 166 116 / 0.1); font-size: 14.5px; line-height: 1.45; }
.js .pblock.on .pb-cover { animation: coverIn 0.8s var(--ease) both; }
.js .pblock.on .pb-body > * { animation: rise 0.7s var(--ease) both; }
.js .pblock.on .pb-body > *:nth-child(2) { animation-delay: 0.05s; }
.js .pblock.on .pb-body > *:nth-child(3) { animation-delay: 0.1s; }
.js .pblock.on .pb-body > *:nth-child(4) { animation-delay: 0.15s; }
@keyframes coverIn { from { opacity: 0; transform: translate3d(-18px, 0, 0) scale(0.97); } to { opacity: 1; transform: none; } }

/* --- форматы: всё помещается в один экран --- */
.sec-head.row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.sec-head.row .sec-lead { margin: 0 0 6px; max-width: 26em; }
.fmts { margin-top: 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fmt { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; padding: 30px 34px 32px; border-radius: 30px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.fmt::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(440px circle at var(--mx, 85%) var(--my, -10%), rgb(232 146 92 / 0.24), transparent 70%); opacity: 0.55; transition: opacity 0.5s ease; }
.fmt:hover::before { opacity: 1; }
.fmt.lit { background: var(--warm); box-shadow: inset 0 0 0 1px var(--lit-edge), 0 50px 110px -60px rgb(232 146 92 / 0.65); }
.fmt-top { align-self: stretch; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.fmt h3 { font-size: clamp(30px, 2.6vw, 42px); }
.price { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.price b { font-family: var(--serif); font-weight: 600; font-size: clamp(56px, 5.2vw, 84px); line-height: 0.85; letter-spacing: -0.02em; white-space: nowrap; }
.fmt.lit .price b { color: var(--hl); }
.price span { font-size: 16.5px; font-weight: 600; color: var(--ink-2); }
.fmt ul { list-style: none; margin: 22px 0 26px; padding: 0; display: grid; gap: 9px; }
.fmt li { position: relative; padding-left: 26px; font-size: 16.5px; line-height: 1.45; }
.fmt li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 12px; height: 2px; border-radius: 2px; background: var(--hl); }
.fmt .cta, .fmt .ghost { margin-top: auto; }
.courses { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-radius: 22px; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.courses li { padding: 16px 22px 18px; }
.courses li + li { box-shadow: inset 1px 0 0 var(--card-edge); }
.courses b { display: block; font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1.1; }
.courses span { display: block; margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--ink-2); }

/* --- запись: один большой призыв в свете --- */
.sign-in { display: grid; justify-items: center; text-align: center; padding: clamp(56px, 9vh, 96px) 30px; border-radius: 44px;
  background: radial-gradient(60% 90% at 50% 0%, rgb(232 146 92 / 0.28), transparent 70%), rgb(27 16 11 / 0.92); box-shadow: inset 0 0 0 1px rgb(240 166 116 / 0.36); }
.sign-in h2 { font-size: clamp(42px, 4.8vw, 80px); }
.sign-in .sec-lead { max-width: 30em; }
.tg-big { margin-top: 34px; display: flex; align-items: center; gap: 22px; width: min(100%, 640px); padding: 14px 14px 14px 34px; border-radius: 999px; background: var(--acc); color: var(--on-acc); transition: transform 0.35s var(--ease); will-change: transform; text-align: left; }
.tg-big span { font-size: 17px; font-weight: 700; }
.tg-big b { margin-left: auto; font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 3vw, 46px); line-height: 1; }
.tg-big i { flex: none; display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: var(--cta-i); }
.tg-big svg { width: 24px; height: 24px; fill: none; stroke: var(--cta-arrow); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.tg-big:hover svg { transform: translateX(4px); }

/* --- контакты отдельной плашкой --- */
.contact { padding-top: 18px; }
.contacts { padding: clamp(30px, 3.4vw, 50px); border-radius: 36px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.contacts h2 { font-size: clamp(32px, 3vw, 48px); }
.c-grid { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr 1fr 1.45fr 1.2fr; gap: 28px; }
.c-grid span { display: block; margin-bottom: 8px; font-size: 14.5px; font-weight: 700; color: var(--hl); }
.c-grid a { font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 1.8vw, 28px); line-height: 1.1; text-decoration: underline; text-decoration-color: rgb(240 166 116 / 0.4); text-decoration-thickness: 1.5px; text-underline-offset: 5px; transition: text-decoration-color 0.25s ease; overflow-wrap: anywhere; }
.c-grid a:hover { text-decoration-color: var(--hl); }
.c-grid p { margin: 0; font-size: 16px; line-height: 1.5; }

/* --- подвал: плашка Melvi по центру, юридические ссылки --- */
.foot { position: relative; z-index: 2; max-width: 1640px; margin: clamp(70px, 9vh, 100px) auto 0; padding: 0 var(--pad) 40px; display: grid; justify-items: center; gap: 20px; text-align: center; }
.legal { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; font-size: 14.5px; color: var(--ink-2); }
.legal a, .legal button { padding: 0; border: 0; background: none; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: rgb(247 236 225 / 0.3); text-underline-offset: 3px; transition: color 0.2s ease; }
.legal a:hover, .legal button:hover { color: var(--ink); }
.melvi-badge { position: relative; display: inline-flex; align-items: center; gap: 12px; height: 46px; padding: 0 18px 0 22px; border-radius: 999px; background: #1a0f0b; isolation: isolate; box-shadow: 0 14px 30px -18px rgb(0 0 0 / 0.7); transition: transform 0.3s var(--ease); }
.melvi-badge:hover { transform: translateY(-2px); }
.melvi-badge::before { content: ""; position: absolute; inset: 0; z-index: -1; padding: 1.2px; border-radius: inherit; background: linear-gradient(100deg, #ffd8b4, #e8925c 40%, #fff1e4 60%, #b8582f); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.mb-txt { font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 236 220 / 0.82); white-space: nowrap; }
.mb-div { width: 1px; height: 18px; background: rgb(255 236 220 / 0.22); }
.mb-m { width: 26px; height: 18px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 4 40 27.5'%3E%3Cpath d='M5.5 28V15.5a8 8 0 0 1 16 0V28M22.5 28V15.5a8 8 0 0 1 16 0V28' fill='none' stroke='%23000' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 4 40 27.5'%3E%3Cpath d='M5.5 28V15.5a8 8 0 0 1 16 0V28M22.5 28V15.5a8 8 0 0 1 16 0V28' fill='none' stroke='%23000' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  background: linear-gradient(115deg, #a8826a 0%, #ffffff 14%, #ffd8b4 26%, #e8925c 36%, #ffffff 46%, #b89a86 56%, #ffffff 66%, #ffe2c8 76%, #e8925c 86%, #a8826a 100%) 0 0 / 300% 100%; animation: mb-sheen 6s linear infinite; }
.mb-word { font-family: "Manrope", sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -0.05em; color: #fff; }
.mb-word i { font-style: normal; color: #f0a674; }
@keyframes mb-sheen { to { background-position: 150% 0; } }

/* --- плашка cookies --- */
.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 30; max-width: 430px; padding: 20px 22px; border-radius: 22px; background: rgb(28 17 12 / 0.97); box-shadow: inset 0 0 0 1px rgb(240 166 116 / 0.32), 0 30px 60px -20px rgb(0 0 0 / 0.75); font-size: 14.5px; line-height: 1.5; animation: rise 0.7s var(--ease) both; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; }
.cookie a { color: var(--hl); text-decoration: underline; text-underline-offset: 3px; }
.cookie-b { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
/* кнопки равнозначные: одинаковые размер и вид, без предвыбора (требование к согласию) */
.cookie button { flex: 1 1 0; min-height: 44px; padding: 0 20px; border: 0; border-radius: 99px; font: inherit; font-weight: 700; cursor: pointer; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgb(247 236 225 / 0.45); transition: background-color 0.2s ease, color 0.2s ease; }
.cookie button:hover { background: var(--ink); color: #1a0f0b; }
.cookie button:focus-visible, .legal button:focus-visible { outline: 2px solid var(--hl); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .gift .sheets { animation: none; }
  .gift .sheets img, .note, .ptab, .tg-big, .tg-big svg, .ghost, .melvi-badge { transition: none; }
  .pen path { transition: none; stroke-dashoffset: 0; }
  .js .pblock.on .pb-cover, .js .pblock.on .pb-body > *, .cookie { animation: none; }
  .mb-m { animation: none; }
}

/* ноутбуки поуже */
@media (min-width: 901px) and (max-width: 1340px) {
  .menu { gap: 18px; }
  .menu a { font-size: 14px; }
  .note { padding: 22px 20px 24px; }
  .note p { font-size: 15.5px; }
  .c-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* телефон */
@media (max-width: 900px) {
  .sec { padding-top: 76px; }
  .gift { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 26px 22px 30px; border-radius: 30px; }
  .gift .sheets { order: -1; height: 210px; }
  .gift.in:hover .sheets img { transition: none; }
  .gift .sheets img { width: 112px; margin: -80px 0 0 -56px; }
  .gift.in .sheets img:nth-child(1) { transform: translateX(-84px) rotate(-13deg); }
  .gift.in .sheets img:nth-child(2) { transform: translateX(-29px) rotate(-4deg); }
  .gift.in .sheets img:nth-child(3) { transform: translateX(29px) rotate(4deg); }
  .gift.in .sheets img:nth-child(4) { transform: translateX(84px) rotate(13deg); }
  .gift-list b { font-size: 26px; min-width: 4.8em; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .note.low, .goal { margin-top: 0; }
  .pen { display: none; }
  .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keys li { padding: 16px 18px 18px; box-shadow: inset 0 -1px 0 var(--card-edge); }
  .keys li + li { box-shadow: inset 0 -1px 0 var(--card-edge); }
  .keys li:nth-child(even) { box-shadow: inset 1px 0 0 var(--card-edge), inset 0 -1px 0 var(--card-edge); }
  .keys li:last-child { grid-column: 1 / -1; }
  .keys b { font-size: 40px; }
  .prog { grid-template-columns: minmax(0, 1fr); margin-top: 26px; }
  .ptabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 8px; scrollbar-width: none; }
  .ptabs::-webkit-scrollbar { display: none; }
  .ptab { flex: none; padding: 7px 16px 7px 7px; }
  .ptab img { width: 34px; height: 48px; border-radius: 7px; }
  .ptab b { font-size: 15.5px; }
  .ptab span { font-size: 13px; }
  .pblock { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px; border-radius: 24px; }
  .pb-cover { height: auto; width: 62%; }
  .pb-topics { columns: 1; }
  .pb-tasks b { width: 46px; }
  .sec-head.row { display: block; }
  .sec-head.row .sec-lead { margin-top: 14px; }
  .fmts { grid-template-columns: minmax(0, 1fr); }
  .fmt { padding: 24px 22px 26px; border-radius: 26px; }
  .fmt-top { flex-direction: column; align-items: flex-start; gap: 12px; }
  .courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .courses li { box-shadow: inset 0 -1px 0 var(--card-edge); }
  .courses li + li { box-shadow: inset 0 -1px 0 var(--card-edge); }
  .courses li:nth-child(even) { box-shadow: inset 1px 0 0 var(--card-edge), inset 0 -1px 0 var(--card-edge); }
  .courses li:last-child { grid-column: 1 / -1; }
  .sign-in { padding: 46px 20px; border-radius: 30px; }
  .tg-big { padding: 12px 12px 12px 22px; gap: 12px; }
  .tg-big span { display: none; }
  .tg-big b { margin-left: 0; font-size: 32px; }
  .tg-big i { margin-left: auto; width: 56px; height: 56px; }
  .contacts { padding: 26px 22px; border-radius: 28px; }
  .c-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .melvi-badge { height: auto; padding: 10px 16px; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .mb-txt { white-space: normal; text-align: center; width: 100%; }
  .mb-div { display: none; }
  .cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* ===== первый экран v17b: заголовок, понятный блок цифр, две кнопки (правки 08.11) ===== */
.hero .copy { justify-content: flex-start; gap: clamp(26px, 4.4vh, 44px); padding-top: clamp(18px, 5vh, 52px); }
.stats { list-style: none; margin: 0; padding: 0; display: flex; align-self: flex-start; max-width: 100%; border-radius: 26px; overflow: hidden; background: rgb(26 15 11 / 0.74); box-shadow: inset 0 0 0 1px rgb(240 166 116 / 0.3), 0 30px 70px -40px rgb(0 0 0 / 0.8); }
.stats li { padding: 22px clamp(20px, 2.2vw, 32px) 24px; }
.stats li + li { box-shadow: inset 1px 0 0 rgb(247 236 225 / 0.1); }
.stats b { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(46px, 4.2vw, 68px); line-height: 0.9; letter-spacing: -0.015em; white-space: nowrap; }
.st-main b { color: var(--hl); }
.stats li > span { display: block; margin-top: 10px; max-width: 11em; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink-2); }
.st-mine { display: grid; grid-template-columns: auto auto; column-gap: clamp(18px, 1.8vw, 28px); align-content: start; }
.st-mine p { margin: 0; }
.st-mine em { display: block; margin-top: 8px; font-style: normal; font-size: 15px; font-weight: 800; color: var(--hl); }
.st-mine .st-cap { grid-column: 1 / -1; grid-row: 2; margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.gift-link { display: inline-flex; align-items: center; gap: 12px; min-height: 72px; padding: 0 30px 0 24px; border-radius: 99px; font-size: 17px; font-weight: 700; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgb(247 236 225 / 0.45); transition: background-color 0.25s ease, box-shadow 0.25s ease; }
.gift-link svg { width: 22px; height: 22px; fill: var(--hl); flex: none; }
.gift-link:hover { background: rgb(247 236 225 / 0.07); box-shadow: inset 0 0 0 1.5px var(--hl); }
.js .stats { animation: rise 1.1s var(--ease) both 0.2s; }
.js .acts { animation: rise 1.1s var(--ease) both 0.32s; }
@media (prefers-reduced-motion: reduce) { .js .stats, .js .acts { animation: none; } .gift-link { transition: none; } }
@media (min-width: 901px) and (max-width: 1340px) {
  .stats li { padding: 18px 18px 20px; }
  .stats li > span, .st-mine em, .st-mine .st-cap { font-size: 13.5px; }
  .gift-link { min-height: 64px; font-size: 16px; }
}
@media (max-width: 900px) {
  .hero .copy { padding-top: 0; }
  .hero h1 { order: 1; }
  .acts { order: 2; margin-top: 18px; flex-direction: column; align-items: stretch; gap: 10px; }
  .acts .cta { width: 100%; }
  .gift-link { justify-content: center; min-height: 62px; font-size: 15.5px; }
  .hero .portrait { order: 3; }
  .stats { order: 4; position: relative; z-index: 2; margin-top: -60px; display: grid; grid-template-columns: 1fr 1fr; }
  .stats li { padding: 16px 16px 18px; }
  .stats li.st-mine { grid-column: 1 / -1; box-shadow: inset 0 1px 0 rgb(247 236 225 / 0.1); justify-content: start; }
  .stats b { font-size: 42px; }
  .stats li > span, .st-mine em, .st-mine .st-cap { font-size: 13.5px; }
}

/* ===== правки 08.11 (вторая волна) ===== */
/* шаги: шире промежутки, чтобы стрелки шли между карточками, а не под ними */
.steps { column-gap: clamp(44px, 4.8vw, 84px); }
.note.low { margin-top: clamp(84px, 12vh, 132px); }

/* программа: заголовок с переключателем предметов, всё в один экран */
.prog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.prog-head .sec-lead { margin-top: 14px; }
.subj { flex: none; display: inline-flex; padding: 5px; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.subj button { min-height: 50px; padding: 0 26px; border: 0; border-radius: 99px; background: none; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease; }
.subj button.on { background: var(--hl); color: #1a0f0b; }
.subj button:not(.on):hover { color: var(--ink); }
.subj button:focus-visible { outline: 2px solid var(--hl); outline-offset: 3px; }
.prog { margin-top: 28px; }
.prog[hidden] { display: none; }
.pb-cover, .chem-cover { height: clamp(280px, 46vh, 400px); }
.ptab .thumb { flex: none; display: grid; place-items: center; width: 48px; height: 68px; border-radius: 9px; background: linear-gradient(160deg, #f7e9db, #efd0b6); color: #3a1d10; font-family: var(--serif); font-style: normal; font-weight: 700; font-size: 15px; line-height: 1; }
.chem-cover { display: flex; flex-direction: column; justify-content: space-between; width: auto; aspect-ratio: 527 / 760; padding: 22px 22px 24px; border-radius: 16px; background: linear-gradient(165deg, #f8ebde, #f0d4bd 60%, #e9c3a5); color: #2c160d; box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.85); }
.cc-top { font-size: 13px; font-weight: 700; color: rgb(44 22 13 / 0.7); }
.cc-mot { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 3vw, 50px); line-height: 1; letter-spacing: -0.01em; }
.cc-name { font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 1.8vw, 28px); line-height: 1.05; }
.js .pblock.on .chem-cover { animation: coverIn 0.8s var(--ease) both; }

/* форматы: подпись под заголовком */
.formats .sec-head .sec-lead { margin-top: 12px; }

/* контакты: ссылка на карту */
.c-grid a.map { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--hl); text-decoration: none; }
.c-grid a.map svg { width: 18px; height: 18px; fill: var(--hl); }
.c-grid a.map:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) { .js .pblock.on .chem-cover { animation: none; } .subj button { transition: none; } }
@media (max-width: 900px) {
  .prog-head { display: block; }
  .subj { margin-top: 18px; }
  .chem-cover { height: auto; width: 62%; }
}

/* ===== правки 08.11 (третья волна) ===== */
/* первый экран: фраза про методику, блок по центру высоты, размеры растут на высоких экранах — без пустоты */
.hero .copy { justify-content: center; padding-top: 0; padding-bottom: clamp(16px, 4vh, 48px); gap: clamp(24px, 4vh, 44px); }
.hero h1 { font-size: clamp(44px, min(5vw, 9.6vh), 92px); }
.hero-lead { margin: calc(-1 * clamp(6px, 1.4vh, 16px)) 0 0; max-width: 30em; font-size: clamp(18px, min(1.5vw, 2.6vh), 24px); font-weight: 500; line-height: 1.5; color: var(--ink); }
.stats b { font-size: clamp(46px, min(4.4vw, 8vh), 76px); }
.stats li { padding: clamp(20px, 2.8vh, 30px) clamp(20px, 2.2vw, 34px); }
/* форматы наравне: одинаковый тёплый вид у обеих карточек и цен */
.fmt { background: var(--warm); box-shadow: inset 0 0 0 1px rgb(240 166 116 / 0.36), 0 50px 110px -70px rgb(232 146 92 / 0.55); }
.fmt .price b { color: var(--hl); }
@media (max-width: 900px) {
  .hero .copy { padding-bottom: 0; }
  .hero-lead { order: 1; margin-top: 12px; font-size: 17px; }
  .hero h1 { font-size: clamp(38px, 10.4vw, 64px); }
}
/* центрирование по высоте: первый экран занимает экран целиком, текст встаёт по середине */
@media (min-width: 901px) {
  .hero-wrap .hero { min-height: calc(100svh - var(--top)); }
  .hero-lead { max-width: 36em; }
}

/* ===== правки 08.11 (четвёртая волна): блок цифр 2×2 с медалью, подписи на одной высоте ===== */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 780px); }
.stats li { padding: clamp(20px, 3vh, 30px) clamp(22px, 2.4vw, 36px) clamp(22px, 3.2vh, 32px); box-shadow: none; }
.stats li:nth-child(even) { box-shadow: inset 1px 0 0 rgb(247 236 225 / 0.1); }
.stats li:nth-child(3) { box-shadow: inset 0 1px 0 rgb(247 236 225 / 0.1); }
.stats li:nth-child(4) { box-shadow: inset 1px 0 0 rgb(247 236 225 / 0.1), inset 0 1px 0 rgb(247 236 225 / 0.1); }
.pair { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 10px; }
.pair b { font-size: clamp(48px, min(4.4vw, 8vh), 74px); }
.pair em { margin-right: 14px; font-style: normal; font-size: 16px; font-weight: 800; color: var(--hl); }
.pair em:last-child { margin-right: 0; }
.stats li > span { max-width: 17em; }
@media (min-width: 901px) and (max-width: 1340px) { .pair em { font-size: 14px; } }

/* ===== телефон: фото поменьше и сверху, заголовок наезжает на его затухание, липкая кнопка записи ===== */
.m-cta { display: none; }
@media (max-width: 900px) {
  .hero .portrait { order: 0; justify-self: end; width: auto; height: min(46svh, 400px); margin: 4px calc(-1 * var(--pad)) 0 0; }
  .hero .portrait img { height: 100%; width: auto; aspect-ratio: 1035 / 1280; object-position: 100% 0;
    -webkit-mask-image: linear-gradient(#000 55%, transparent 96%); mask-image: linear-gradient(#000 55%, transparent 96%); }
  .hero h1 { order: 1; position: relative; z-index: 2; margin-top: -70px; }
  .hero-lead { order: 1; position: relative; z-index: 2; }
  .stats { order: 3; margin-top: 22px; width: 100%; }
  .stats li:nth-child(3), .stats li:nth-child(4) { grid-column: 1 / -1; box-shadow: inset 0 1px 0 rgb(247 236 225 / 0.1); }
  .stats li { padding: 16px 16px 18px; }
  .pair b { font-size: 40px; }
  .pair em { font-size: 13px; margin-right: 10px; }
  .stats li > span { font-size: 13px; }
  .acts { order: 2; margin-top: 18px; }
  .m-cta { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 60px; padding: 0 7px 0 22px; border-radius: 99px; background: var(--acc); color: var(--on-acc); font-size: 15.5px; font-weight: 700;
    box-shadow: 0 18px 40px -14px rgb(0 0 0 / 0.85); transform: translate3d(0, 150%, 0); transition: transform 0.45s var(--ease); }
  .m-cta.show { transform: none; }
  .m-cta i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--cta-i); }
  .m-cta svg { width: 20px; height: 20px; fill: none; stroke: var(--cta-arrow); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .foot { padding-bottom: 96px; }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) { .m-cta { transition: none; } }
@media (max-width: 900px) { .note.low { margin-top: 0; } }

/* =====================================================================
   ТЕЛЕФОН (до 600px) — отдельная компоновка: каждый блок помещается в экран
   ===================================================================== */
@media (max-width: 600px) {
  :root { --top: 58px; --pad: 16px; }
  .top { height: var(--top); gap: 12px; }
  .top::before { opacity: 1; background: rgb(18 12 10 / 0.97); }
  .brand { font-size: 20px; }
  .tg { padding: 8px 14px; font-size: 13px; }

  /* первый экран: фото по центру, ниже заголовок, факты и кнопки — всё в один экран */
  .hero-wrap { min-height: 0; }
  .hero { padding-top: 2px; padding-bottom: 8px; }
  .hero .portrait { order: 0; justify-self: stretch; width: 100%; height: min(32svh, 280px); margin: 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 60%, transparent 100%); mask-image: linear-gradient(#000 60%, transparent 100%); }
  .hero .portrait img { width: 100%; height: auto; aspect-ratio: 1035 / 1280; object-position: 50% 0; -webkit-mask-image: none; mask-image: none; }
  .hero h1 { margin-top: -42px; font-size: clamp(27px, 7.9vw, 34px); line-height: 1.05; }
  .hero-lead { margin-top: 8px; font-size: 14.5px; line-height: 1.45; }
  .stats { order: 2; margin-top: 14px; border-radius: 18px; }
  .stats li { padding: 11px 12px 12px; }
  .stats li:nth-child(3), .stats li:nth-child(4) { grid-column: auto; }
  .stats li:nth-child(odd) { box-shadow: none; }
  .stats li:nth-child(2) { box-shadow: inset 1px 0 0 rgb(247 236 225 / 0.1); }
  .stats li:nth-child(3) { box-shadow: inset 0 1px 0 rgb(247 236 225 / 0.1); }
  .stats li:nth-child(4) { box-shadow: inset 1px 0 0 rgb(247 236 225 / 0.1), inset 0 1px 0 rgb(247 236 225 / 0.1); }
  .pair { column-gap: 4px; }
  .pair b { font-size: 29px; }
  .pair em { margin-right: 6px; font-size: 10.5px; }
  .stats li > span { margin-top: 5px; font-size: 11.5px; line-height: 1.3; }
  .acts { order: 3; margin-top: 12px; gap: 8px; }
  .acts .cta { min-height: 54px; padding-left: 20px; font-size: 15px; }
  .acts .cta i { width: 42px; height: 42px; }
  .gift-link { min-height: 46px; font-size: 14.5px; }

  /* общие размеры блоков */
  .sec { padding-top: 60px; }
  h2 { font-size: 30px; }
  .sec-lead { margin-top: 8px; font-size: 14.5px; line-height: 1.45; }

  /* как проходит подготовка: компактная линия шагов */
  .method h2 { margin-bottom: 18px; }
  .steps { display: block; position: relative; padding-left: 28px; }
  .steps::before { content: ""; position: absolute; left: 7px; top: 9px; bottom: 26px; width: 2px; border-radius: 2px; background: linear-gradient(var(--hl), rgb(240 166 116 / 0.3)); }
  .note { padding: 0 0 15px; background: none; box-shadow: none; border-radius: 0; }
  .note:hover { transform: none; box-shadow: none; }
  .note::before { content: ""; position: absolute; left: -26px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--hl), 0 0 12px rgb(232 146 92 / 0.55); }
  .note h3 { font-size: 19px; }
  .note p { margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
  .goal { display: inline-block; margin: 0; padding: 11px 16px; border-radius: 14px; font-size: 21px; }
  .goal span { display: inline; margin: 0 0 0 4px; font-size: 13px; }
  .goal::before { content: ""; position: absolute; left: -26px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--hl); box-shadow: 0 0 14px rgb(232 146 92 / 0.8); }
  .keys { margin-top: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 18px; }
  .keys li, .keys li + li, .keys li:nth-child(even) { padding: 11px 11px 12px; box-shadow: none; }
  .keys li:last-child { grid-column: auto; }
  .keys li:nth-child(2), .keys li:nth-child(3) { box-shadow: inset 1px 0 0 var(--card-edge); }
  .keys li:nth-child(4) { box-shadow: inset 0 1px 0 var(--card-edge); }
  .keys li:nth-child(5) { box-shadow: inset 1px 0 0 var(--card-edge), inset 0 1px 0 var(--card-edge); }
  .keys b { font-size: 24px; }
  .keys span { margin-top: 3px; font-size: 11.5px; }

  /* программа: короткие кнопки блоков, сверху обложка и название, ниже темы */
  .subj { margin-top: 12px; }
  .subj button { min-height: 40px; padding: 0 18px; font-size: 14px; }
  .prog { margin-top: 12px; }
  .ptabs { gap: 6px; padding-bottom: 8px; }
  .ptab { padding: 8px 14px; border-radius: 99px; }
  .ptab img, .ptab .thumb { display: none; }
  .ptab span { font-size: 0; }
  .ptab b { margin: 0; font-size: 13.5px; }
  .pblock { grid-template-columns: 64px minmax(0, 1fr); gap: 10px 14px; padding: 14px; border-radius: 18px; align-items: center; }
  .pb-body { display: contents; }
  .pb-cover, .chem-cover { grid-column: 1; grid-row: 1; width: 64px; height: auto; border-radius: 8px; box-shadow: 0 10px 20px -10px rgb(0 0 0 / 0.8); }
  .chem-cover { padding: 6px; justify-content: center; align-items: center; }
  .cc-top, .cc-name { display: none; }
  .cc-mot { font-size: 13px; text-align: center; }
  .pb-body h3 { grid-column: 2; grid-row: 1; font-size: 24px; }
  .pb-topics, .pb-tasks, .pb-note { grid-column: 1 / -1; }
  .pb-topics li, .pb-topics.few li { padding: 6px 0 6px 18px; font-size: 13.5px; }
  .pb-topics li::before { top: 0.95em; width: 9px; }
  .pb-topics i { font-size: 11px; padding: 1px 7px; }
  .pb-tasks { gap: 8px; margin-top: 4px; }
  .pb-tasks b { width: 40px; font-size: 13px; }
  .chips { gap: 5px; }
  .chips i { min-width: 32px; height: 30px; padding: 0 8px; border-radius: 9px; font-size: 13px; }
  .pb-note { font-size: 12.5px; padding: 8px 10px; }

  /* форматы: две карточки листаются вбок, обе на виду одинаково */
  .fmts { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 16px calc(-1 * var(--pad)) 0; padding: 0 var(--pad) 6px; scrollbar-width: none; }
  .fmts::-webkit-scrollbar { display: none; }
  .fmt { flex: 0 0 86%; scroll-snap-align: center; padding: 20px 18px; border-radius: 22px; }
  .fmt-top { gap: 6px; }
  .fmt h3 { font-size: 24px; }
  .price b { font-size: 52px; }
  .price span { font-size: 14px; }
  .fmt ul { margin: 14px 0 18px; gap: 6px; }
  .fmt li { padding-left: 20px; font-size: 14px; }
  .fmt li::before { width: 10px; }
  .fmt .cta-sm { min-height: 52px; font-size: 14.5px; padding-left: 20px; }
  .fmt .cta-sm i { width: 40px; height: 40px; }
  .courses { margin-top: 12px; border-radius: 18px; }
  .courses li, .courses li + li, .courses li:nth-child(even) { padding: 10px 13px 11px; }
  .courses b { font-size: 17px; }
  .courses span { font-size: 12.5px; }

  /* запись и контакты */
  .sign-in { padding: 30px 16px 26px; border-radius: 24px; }
  .sign-in h2 { font-size: 30px; }
  .tg-big { margin-top: 22px; padding: 8px 8px 8px 20px; }
  .tg-big b { font-size: 26px; }
  .tg-big i { width: 48px; height: 48px; }
  .contacts { padding: 20px 18px; border-radius: 22px; }
  .contacts h2 { font-size: 26px; }
  .c-grid { margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .c-grid li:nth-child(n+4) { grid-column: 1 / -1; }
  .c-grid span { margin-bottom: 4px; font-size: 12.5px; }
  .c-grid a { font-size: 18px; }
  .c-grid p { font-size: 14px; }
  .c-grid a.map { margin-top: 6px; font-size: 13.5px; }
  .foot { margin-top: 50px; gap: 14px; }
  .legal { font-size: 13px; gap: 8px 18px; }
  .m-cta { min-height: 54px; font-size: 14.5px; padding-left: 20px; }
  .m-cta i { width: 42px; height: 42px; }
}
@media (max-width: 600px) { .hero .portrait { display: block; } }
@media (max-width: 600px) {
  .hero .portrait { height: min(30svh, 262px); }
  .hero h1 { margin-top: -12px; }
}

/* ===== правки 08.11 (пятая волна) ===== */
/* форматы: галочки вместо чёрточек; переключатель виден только на телефоне */
.fmt li::before { top: 0.18em; width: 17px; height: 17px; border-radius: 0; background: var(--hl);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.fmt li { padding-left: 28px; }
.fmt-switch { display: none; }
.ci { display: none; }

@media (max-width: 600px) {
  /* первый экран без фото: заголовок крупнее, всё по центру экрана, свет за ним справа */
  .hero .portrait { display: none; }
  .hero-wrap .hero { min-height: calc(100svh - var(--top)); align-content: center; padding-top: 10px; padding-bottom: 18px; }
  .hero h1 { margin-top: 0; font-size: clamp(34px, 9.8vw, 42px); line-height: 1.04; }
  .hero-lead { margin-top: 12px; font-size: 15.5px; }
  .stats { margin-top: 20px; }
  .stats li { padding: 14px 14px 15px; }
  .pair b { font-size: 33px; }
  .pair em { font-size: 11px; }
  .stats li > span { font-size: 12px; }
  .acts { margin-top: 18px; gap: 10px; }

  /* как проходит подготовка: карточки зигзагом, стрелки от руки по свободному полю */
  .steps { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 30px; padding-left: 0; }
  .steps::before { display: none; }
  .pen { display: block; }
  .pen path { stroke-width: 1.8; }
  .note { width: 80%; padding: 14px 16px 15px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge), 0 18px 34px -24px rgb(0 0 0 / 0.9); }
  .note::before { display: none; }
  #m1, #m3 { justify-self: start; }
  #m2, #m4 { justify-self: end; }
  .note h3 { font-size: 19px; }
  .note p { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
  .goal { justify-self: center; margin: 0; padding: 12px 18px; border-radius: 16px; font-size: 22px; text-align: center; }
  .goal::before { display: none; }
  .goal span { display: block; margin: 4px 0 0; font-size: 12.5px; }
  .js #m1[data-reveal], .js #m3[data-reveal] { transform: translate3d(-26px, 0, 0); }
  .js #m2[data-reveal], .js #m4[data-reveal] { transform: translate3d(26px, 0, 0); }
  .js .note[data-reveal].in { transform: none; }

  /* форматы: переключатель вместо карусели, видна одна карточка */
  .fmt-switch { display: inline-flex; margin-top: 16px; padding: 4px; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
  .fmt-switch button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 99px; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease; }
  .fmt-switch button.on { background: var(--hl); color: #1a0f0b; }
  .fmts { display: block; overflow: visible; margin: 12px 0 0; padding: 0; }
  .fmt { width: 100%; }
  .fmt:not(.on-m) { display: none; }
  .fmt.on-m { animation: rise 0.6s var(--ease) both; }
  .fmt li { padding-left: 24px; }
  .fmt li::before { width: 15px; height: 15px; }

  /* контакты: строки с иконками, удобно нажимать */
  .c-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; }
  .c-grid li, .c-grid li:nth-child(n+4) { grid-column: auto; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 11px 12px; border-radius: 16px; background: rgb(247 236 225 / 0.035); box-shadow: inset 0 0 0 1px var(--card-edge); }
  .ci { grid-row: 1 / span 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgb(240 166 116 / 0.14); }
  .ci svg { width: 20px; height: 20px; fill: var(--hl); }
  .c-grid span { grid-column: 2; margin: 0; font-size: 12px; }
  .c-grid a, .c-grid p, .c-grid a.map { grid-column: 2; }
  .c-grid a { font-size: 18px; }
  .c-grid p { font-size: 13.5px; line-height: 1.4; }
  .c-grid a.map { margin-top: 4px; }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .js #m1[data-reveal], .js #m2[data-reveal], .js #m3[data-reveal], .js #m4[data-reveal] { transform: none; }
  .fmt.on-m { animation: none; }
}
@media (max-width: 600px) {
  .js #m1[data-reveal].in, .js #m2[data-reveal].in, .js #m3[data-reveal].in, .js #m4[data-reveal].in { transform: none; }
  /* цифры: мои баллы и медаль — каждая строкой на всю ширину, чтобы ничего не переносилось */
  .stats li:nth-child(3), .stats li:nth-child(4) { grid-column: 1 / -1; box-shadow: inset 0 1px 0 rgb(247 236 225 / 0.1); }
  .stats li:nth-child(4) .pair { display: inline-flex; }
}

/* ===== правки 08.11 (шестая волна) ===== */
/* заголовки разделов того же размера, что и главный */
h2 { font-size: clamp(40px, min(5vw, 9.6vh), 88px); }
.sign-in h2 { font-size: clamp(40px, min(5vw, 9.6vh), 88px); }
.contacts h2 { font-size: clamp(32px, 3vw, 48px); }
/* плашка Melvi: компактнее и в самом низу, под ссылками */
.foot { gap: 22px; padding-bottom: 34px; }
.melvi-badge { height: 34px; gap: 9px; padding: 0 13px 0 15px; }
.mb-txt { font-size: 9px; letter-spacing: 0.1em; }
.mb-div { height: 14px; }
.mb-m { width: 20px; height: 14px; }
.mb-word { font-size: 15px; }

@media (max-width: 600px) {
  /* первый экран: фото в рамке справа от заголовка, ниже фраза, цифры и кнопки */
  .hero-wrap .hero { grid-template-columns: minmax(0, 1fr) 41%; column-gap: 14px; align-content: center; }
  .hero h1 { grid-column: 1; grid-row: 1; align-self: center; margin: 0; font-size: clamp(27px, 7.8vw, 32px); line-height: 1.06; }
  .hero h1 .ln { display: inline; }
  .hero .portrait { display: block; grid-column: 2; grid-row: 1; position: relative; width: 100%; height: auto; aspect-ratio: 3 / 4; margin: 6px 0; overflow: hidden; border-radius: 20px;
    background: radial-gradient(85% 70% at 55% 26%, #f0a674 0%, #b8582f 38%, #4a2213 72%, #24130d 100%);
    box-shadow: inset 0 0 0 1px rgb(240 166 116 / 0.5), 0 22px 44px -22px rgb(0 0 0 / 0.85);
    outline: 1px solid rgb(240 166 116 / 0.35); outline-offset: 5px; -webkit-mask-image: none; mask-image: none; }
  .hero .portrait img { position: absolute; left: 50%; bottom: 0; width: 104%; height: auto; max-width: none; transform: translateX(-50%); -webkit-mask-image: none; mask-image: none; border-radius: 0; }
  .js .hero .portrait img { animation: none; }
  .hero-lead, .stats, .acts { grid-column: 1 / -1; }
  .hero-lead { grid-row: 2; margin-top: 16px; font-size: 15px; }
  .stats { grid-row: 3; margin-top: 16px; }
  .acts { grid-row: 4; margin-top: 16px; }
  .stats li { padding: 12px 14px 13px; }
  .pair b { font-size: 30px; }
  /* заголовки одного размера, блоки отделены воздухом */
  h2, .sign-in h2 { font-size: clamp(27px, 7.8vw, 32px); }
  .contacts h2 { font-size: 24px; }
  .sec { padding-top: 72px; }
  /* плашка Melvi в одну строку */
  .melvi-badge { height: 32px; padding: 0 12px; flex-wrap: nowrap; gap: 8px; }
  .mb-txt { width: auto; font-size: 8px; letter-spacing: 0.08em; white-space: nowrap; }
  .mb-div { display: block; }
  .foot { padding-bottom: 92px; }
}
@media (max-width: 600px) {
  /* фото в рамке ровно по высоте заголовка: верх и низ совпадают */
  .hero-wrap .hero { grid-template-columns: minmax(0, 1fr) 42%; column-gap: 16px; }
  .hero h1 { align-self: start; font-size: clamp(28px, 8.4vw, 35px); line-height: 1.06; }
  .hero .portrait { align-self: stretch; aspect-ratio: auto; height: auto; min-height: 0; margin: 0; }
  .hero .portrait img { inset: 0; left: 0; bottom: auto; width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; transform: none; }
}

/* ===== правки 08.11 (седьмая волна): «Почему со мной», «Когда начинать», телефонные цифры ===== */
.m-only, .medal { display: none; }
.stats li.d-only { box-shadow: inset 0 1px 0 rgb(247 236 225 / 0.1); }
.stats li.st-medal { box-shadow: inset 1px 0 0 rgb(247 236 225 / 0.1), inset 0 1px 0 rgb(247 236 225 / 0.1); }

/* почему со мной */
.why h2 { margin-bottom: clamp(24px, 3.4vh, 40px); }
.why-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.why-grid li { padding: clamp(22px, 2.4vw, 32px); border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.why-grid li:first-child { background: var(--warm); box-shadow: inset 0 0 0 1px rgb(240 166 116 / 0.4); }
.why-grid b { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2vw, 32px); line-height: 1.1; }
.why-grid li:first-child b { color: var(--hl); }
.why-grid p { margin: 10px 0 0; font-size: 16.5px; line-height: 1.5; }

/* когда начинать */
.plan { margin-top: clamp(40px, 6vh, 64px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.plan-h { grid-column: 1 / -1; margin: 0 0 4px; font-size: clamp(26px, 2.2vw, 36px); }
.plan-card { padding: 24px 28px 26px; border-radius: 24px; background: var(--warm); box-shadow: inset 0 0 0 1px rgb(240 166 116 / 0.36); }
.pl-exam { margin: 0; font-size: 15px; font-weight: 800; color: var(--hl); }
.pl-big { margin: 6px 0 0; font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 3.6vw, 58px); line-height: 1; }
.pl-txt { margin: 10px 0 0; font-size: 16px; line-height: 1.5; }
.plan-note { grid-column: 1 / -1; margin: 4px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.plan-note a { color: var(--hl); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) and (min-width: 601px) { .why-grid { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 600px) {
  /* первый экран: вытянутое фото справа, заголовок и фраза слева сверху, без пустоты внизу */
  .hero-wrap .hero { min-height: 0; align-content: start; padding-top: 18px; padding-bottom: 6px; grid-template-columns: minmax(0, 1fr) 44%; column-gap: 14px; }
  .hero h1 { grid-column: 1; grid-row: 1; align-self: start; }
  .hero-lead { grid-column: 1; grid-row: 2; align-self: start; margin-top: 10px; font-size: 14px; line-height: 1.45; }
  .hero .portrait { grid-column: 2; grid-row: 1 / span 2; align-self: start; aspect-ratio: 3 / 4.1; height: auto; }
  .hero .portrait img { object-position: 50% 8%; }
  .stats { grid-row: 3; }
  .acts { grid-row: 4; }
  /* цифры: ровная сетка 2×2 и строка медали */
  .d-only { display: none; }
  .m-only { display: block; }
  .stats li:nth-child(3) { grid-column: auto; }
  .stats li:nth-child(4) { grid-column: auto; box-shadow: inset 0 1px 0 rgb(247 236 225 / 0.1); }
  .stats li:nth-child(5) { grid-column: auto; box-shadow: inset 1px 0 0 rgb(247 236 225 / 0.1), inset 0 1px 0 rgb(247 236 225 / 0.1); }
  .stats li.st-medal { grid-column: 1 / -1; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; align-items: center; box-shadow: inset 0 1px 0 rgb(247 236 225 / 0.1); }
  .medal { display: grid; grid-row: 1 / span 2; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgb(240 166 116 / 0.16); }
  .medal svg { width: 20px; height: 20px; fill: var(--hl); }
  .st-medal .pair b { font-size: 24px; }
  .st-medal > span { margin-top: 2px; }
  .pair b { font-size: 32px; }

  /* блоки отделены тёплой полосой фона через один */
  .sec { padding-top: 56px; }
  .method::before, .formats::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 22px; bottom: -34px;
    background: linear-gradient(180deg, rgb(70 36 22 / 0), rgb(70 36 22 / 0.55) 70px, rgb(70 36 22 / 0.55) calc(100% - 70px), rgb(70 36 22 / 0)); }

  /* почему со мной */
  .why h2 { margin-bottom: 16px; }
  .why-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .why-grid li { padding: 14px 16px 15px; border-radius: 18px; }
  .why-grid b { font-size: 19px; }
  .why-grid p { margin-top: 4px; font-size: 13.5px; line-height: 1.45; }

  /* когда начинать */
  .plan { margin-top: 26px; gap: 8px; }
  .plan-h { font-size: 22px; margin-bottom: 2px; }
  .plan-card { padding: 14px 14px 15px; border-radius: 18px; }
  .pl-exam { font-size: 13px; }
  .pl-big { margin-top: 4px; font-size: 26px; }
  .pl-txt { margin-top: 6px; font-size: 12.5px; line-height: 1.4; }
  .plan-note { font-size: 13px; }
}

/* медью — все баллы ЕГЭ (учеников и её собственные), белым — количество и медаль */
.stats li.d-only b, .stats li.m-only b { color: var(--hl); }
.stats li.d-only .pair em { color: var(--ink); }
