/* Aroken — страницы курсов (JavaScript, ИИ, WordPress) и результатов. Токены и общие компоненты — в main.css. */

/* ---------- Первый экран курса: панель «Код» ---------- */
/* Гутер — отдельная колонка фиксированной ширины; строки не переносятся, длинные — горизонтальный скролл внутри панели. */
.code--rows { padding: 22px 0 0 20px; font-size: 14px; line-height: 22px; }
.code--rows .code__gutter { flex: none; width: 2ch; font-size: 12px; line-height: 22px; }
.code--rows .code__lines { flex: 1 1 auto; min-width: 0; padding: 0 16px 12px 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.code--rows .ln { display: block; white-space: pre; word-break: normal; overflow-wrap: normal; }
.code--rows .ln:empty::before { content: "\00a0"; } /* пустая строка держит высоту — гутер не разъезжается */
.code--rows .k { color: #B285FF; }
.code--rows .f { color: var(--lime); }
.code--rows .str { color: var(--coral); }
.code--rows .cm { color: rgba(186, 191, 201, .5); }

/* «Что ты сделаешь», «Программа» и «Кому подойдёт» на страницах курсов — в css/course-blocks.css: у каждой страницы своя раскладка. */

/* ---------- Живой «Результат» лендингов: у каждой страницы своя сцена и палитра ---------- */
.demo__result--site, .demo__result--app, .demo__result--draft, .demo__result--admin { padding: 20px 24px 24px; display: flex; flex-direction: column; overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.demo__result--site::after, .demo__result--app::after, .demo__result--draft::after, .demo__result--admin::after { display: none; }
/* Подсказка «Потяни разделитель» закрывала низ живых демо — на лендингах её нет, ручка разделителя видна и так */
.demo__result--site ~ .demo__hint, .demo__result--app ~ .demo__hint, .demo__result--draft ~ .demo__hint, .demo__result--admin ~ .demo__hint { display: none; }

/* Флагман: окно браузера со светлым сайтом кофейни */
.demo__result--site { padding: 16px; background: radial-gradient(70% 60% at 50% 110%, rgba(214, 160, 96, .22), rgba(214, 160, 96, 0)), #0E0F13; }
.site { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: #FAF7F0; color: var(--ink); box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .5); }
.site__bar { flex: none; height: 34px; padding: 0 12px; display: flex; align-items: center; gap: 10px; background: #ECE6DB; border-bottom: 1px solid rgba(23, 24, 28, .08); }
.site__dots { display: flex; gap: 5px; }
.site__dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(23, 24, 28, .22); }
.site__url { flex: 1 1 auto; height: 22px; padding: 0 10px; border-radius: 6px; background: #fff; font: 500 11px/22px var(--mono); color: #57575D; }
.site__page { flex: 1 1 auto; min-height: 0; padding: 14px 16px 16px; overflow: hidden; background: linear-gradient(165deg, #FEFDF9, #F3EEE3); }
.site__nav { display: flex; align-items: center; justify-content: space-between; }
.site__logo { font-size: 13px; line-height: 16px; font-weight: 700; color: #6B4A2B; }
.site__links { display: flex; gap: 6px; }
.site__links i { width: 22px; height: 6px; border-radius: 3px; background: rgba(107, 74, 43, .22); }
.site__title { margin-top: 12px; font-size: 21px; line-height: 25px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.site__text { margin-top: 6px; font-size: 13px; line-height: 18px; color: #5B5B61; overflow-wrap: anywhere; }
.site__btn { display: inline-flex; align-items: center; margin-top: 12px; height: 32px; padding: 0 14px; border-radius: 8px; background: #6B4A2B; color: #FAF7F0; font-size: 12px; font-weight: 600; }
.site__menu { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.site__menu li { padding: 10px 8px 8px; border-radius: 10px; background: #fff; border: 1px solid rgba(23, 24, 28, .08); display: flex; flex-direction: column; gap: 3px; font-size: 11px; line-height: 14px; box-shadow: 0 4px 10px -6px rgba(23, 24, 28, .25); }
.site__emoji { font-size: 20px; line-height: 24px; }
.site__name { color: #3A3A40; }
.site__menu b { font-weight: 600; }
.site__map { position: relative; margin-top: 10px; height: 58px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #DCEBD3, #CFE3C4 55%, #C3D8E8); }
.site__map::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(23, 24, 28, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 24, 28, .08) 1px, transparent 1px); background-size: 22px 22px; }
.site__map::after { content: ""; position: absolute; left: -10%; top: 46%; width: 120%; height: 6px; background: rgba(255, 255, 255, .8); transform: rotate(-8deg); }
.site__pin { position: absolute; left: 52%; top: 30%; width: 12px; height: 12px; border-radius: 50% 50% 50% 0; background: var(--coral); transform: rotate(-45deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
.site__addr { position: absolute; left: 10px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .9); font: 500 10px/14px var(--font); color: #3A3A40; }

/* JavaScript: мини-Todo — графит + жёлтый JS (#F7DF1E) */
.demo__result--app { --js: #F7DF1E; background: radial-gradient(60% 45% at 50% 105%, rgba(247, 223, 30, .2), rgba(247, 223, 30, 0)), #15171C; }
.demo__result--app::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--js), rgba(247, 223, 30, .15)); }
.todo { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.todo__head { display: flex; align-items: center; gap: 10px; }
.todo__badge { width: 28px; height: 28px; flex: none; padding-right: 3px; border-radius: 6px; background: var(--js); color: #000; font: 800 12px/28px var(--font); text-align: right; box-shadow: 0 4px 12px rgba(247, 223, 30, .35); }
.todo__title { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -.01em; }
.todo__count { margin-left: auto; font: 500 12px/16px var(--mono); color: rgba(247, 223, 30, .8); white-space: nowrap; }
.todo__form { display: flex; gap: 8px; }
.todo__input { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: #0F1114; color: #fff; font: 400 14px var(--font); transition: border-color .2s, box-shadow .2s; }
.todo__input::placeholder { color: #8C8F99; }
.todo__input:focus { outline: none; border-color: var(--js); box-shadow: 0 0 0 3px rgba(247, 223, 30, .2); }
/* Кнопка макета — тонированная, а не сплошная: на первом экране одна Primary-кнопка, и это «Оставить заявку» на бумаге, а не «Добавить» внутри демо */
.todo__add { flex: none; height: 44px; padding: 0 16px; border: 1px solid rgba(247, 223, 30, .4); border-radius: 12px; background: rgba(247, 223, 30, .16); color: var(--js); font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease); }
.todo__add:hover { background: var(--js); color: #000; transform: translateY(-1px); }
.todo__list { display: flex; flex-direction: column; gap: 8px; }
.todo__item { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); animation: todo-in .3s var(--ease); }
@keyframes todo-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.todo__label { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.todo__check { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--js); cursor: pointer; }
.todo__text { font-size: 14px; line-height: 20px; overflow-wrap: anywhere; transition: color .2s; }
.todo__item.is-done { border-color: rgba(247, 223, 30, .25); }
.todo__item.is-done .todo__text { color: var(--muted); text-decoration: line-through; }
.todo__del { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.todo__del:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.todo__empty { padding: 12px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, .16); font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.todo__hint { margin-top: auto; padding-top: 8px; font: 400 10px/16px var(--mono); color: #8A8D95; }

/* ИИ: лог агента + черновик с печатью — фиолет (#B8A3FF) */
.demo__result--draft { background: radial-gradient(60% 45% at 50% 105%, rgba(184, 163, 255, .22), rgba(184, 163, 255, 0)), #14121F; }
.draft { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.draft__log { margin: 0; min-height: 60px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(184, 163, 255, .18); font: 500 11px/20px var(--mono); color: rgba(184, 163, 255, .9); white-space: pre-wrap; overflow: hidden; }
.draft__status { display: flex; align-items: center; gap: 8px; font: 500 12px/16px var(--mono); color: var(--muted); }
.draft__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 10px rgba(184, 163, 255, .8); animation: draft-pulse 1s ease-in-out infinite; }
.draft.is-done .draft__dot { background: var(--lime-2); box-shadow: 0 0 10px rgba(215, 255, 69, .7); animation: none; }
@keyframes draft-pulse { 50% { opacity: .35; } }
.draft__page { flex: 1 1 auto; padding: 18px; border-radius: 16px; background: linear-gradient(160deg, #1E1A30, #131120); border: 1px solid rgba(184, 163, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.draft__eyebrow { min-height: 16px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--violet); }
.draft__title { min-height: 56px; margin-top: 10px; font-size: 24px; line-height: 28px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.draft__text { min-height: 40px; margin-top: 10px; font-size: 14px; line-height: 20px; color: var(--muted-2); }
.draft__btn { display: inline-flex; align-items: center; margin-top: 16px; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--violet); color: #14101F; font-size: 13px; font-weight: 600; box-shadow: 0 0 16px rgba(184, 163, 255, .3); }
.draft__btn:empty { display: none; }
.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.12em; background: var(--violet); animation: draft-caret 1s steps(2) infinite; }
@keyframes draft-caret { 50% { opacity: 0; } }
.draft__again { align-self: flex-start; height: 40px; padding: 0 16px; border: 1px solid rgba(184, 163, 255, .3); border-radius: 12px; background: rgba(184, 163, 255, .08); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .2s, background .2s; }
.draft__again:hover { border-color: var(--violet); background: rgba(184, 163, 255, .16); }
.draft__again:disabled { opacity: .5; cursor: default; }

/* WordPress: админка с сайдбаром → превью — WP-синий (#21759B / #73D6FF) */
.demo__result--admin { --wp: #21759B; padding: 0; background: radial-gradient(60% 45% at 60% 105%, rgba(115, 214, 255, .18), rgba(115, 214, 255, 0)), #111820; }
.admin { position: relative; z-index: 1; display: grid; grid-template-columns: 44px minmax(0, 1fr); min-height: 100%; }
.admin__side { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; background: #16243A; border-right: 1px solid rgba(255, 255, 255, .06); }
.admin__wp { width: 28px; height: 28px; margin-bottom: 8px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); color: #fff; font: 800 13px/24px var(--font); text-align: center; }
.admin__ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: rgba(255, 255, 255, .55); }
.admin__ico.is-active { background: var(--wp); color: #fff; box-shadow: 0 0 14px rgba(33, 117, 155, .6); }
.admin__main { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 16px 16px; overflow: auto; scrollbar-width: thin; }
.admin__panel { padding: 12px 14px 14px; border-radius: 12px; background: #F0F0F1; color: #1D2327; }
.admin__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 16px; font-weight: 600; color: #1D2327; }
.admin__crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin__acf { flex: none; padding: 1px 6px; border-radius: 4px; background: #00A0D2; color: #fff; font: 700 10px/16px var(--font); letter-spacing: .04em; }
.admin__field { display: block; margin-top: 10px; }
.admin__label { display: block; font: 500 11px/14px var(--mono); color: #50575E; }
.admin__input { display: block; width: 100%; margin-top: 4px; height: 34px; padding: 0 10px; border-radius: 4px; border: 1px solid #8C8F94; background: #fff; color: #1D2327; font: 400 14px var(--font); }
.admin__input:focus { outline: 2px solid #2271B1; outline-offset: 0; border-color: #2271B1; }
.admin__note { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 11px; line-height: 14px; color: #50575E; }
.admin__save { flex: none; padding: 4px 10px; border-radius: 3px; background: #2271B1; color: #fff; font-size: 11px; font-weight: 600; }
.admin__preview { flex: 1 1 auto; padding: 18px; border-radius: 12px; background: linear-gradient(160deg, #10202E, #0B141C); border: 1px solid rgba(115, 214, 255, .16); }
.admin__brand { font-size: 13px; line-height: 16px; font-weight: 700; color: var(--cobalt); }
.admin__ptitle { margin-top: 12px; font-size: 22px; line-height: 26px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.admin__ptext { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--muted-2); overflow-wrap: anywhere; }
.admin__pbtn { display: inline-flex; align-items: center; margin-top: 14px; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--cobalt); color: #000; font-size: 13px; font-weight: 600; box-shadow: 0 0 16px rgba(115, 214, 255, .3); }

/* ---------- Стоимость и рассрочка (флагман) ---------- */
.pricing__grid { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 704fr) minmax(0, 712fr); gap: 24px; }
/* Карточка цены — сетка: слева цена и условия, справа сверху билет курса, под ним миниатюра сертификата; внизу вычет и кнопка.
   Ширина билета и кегль цены — от ширины карточки (container query), поэтому колонка с ценой не уже 356 px и билет ни на что не наезжает */
.price {
  container-type: inline-size; min-height: 380px; padding: 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) min-content; grid-template-rows: auto auto auto auto auto auto 1fr auto; column-gap: 24px;
  grid-template-areas: "course ticket" "month ticket" "terms ticket" "sum cert" "once cert" "list list" ". ." "bottom bottom";
  background: linear-gradient(111deg, var(--paper-1) 2%, var(--paper-2) 55%, var(--paper-3) 96%);
}
.price__course { grid-area: course; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.015em; }
/* Порог входа — главная цифра: рассрочка крупно, полная цена второй строкой */
.price__month { grid-area: month; margin-top: 10px; font-size: 56px; line-height: 1.143; font-weight: 700; letter-spacing: -.028em; }
.price__terms { grid-area: terms; margin-top: 6px; max-width: 400px; font-size: 14px; line-height: 20px; color: rgba(23, 24, 28, .7); }
.price__sum { grid-area: sum; margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.02em; }
.price__once { grid-area: once; margin-top: 4px; font-size: 14px; line-height: 20px; color: rgba(23, 24, 28, .7); }
/* Акция в ценнике: лаймовый стикер «−15% · до 16 сентября» у полной цены и зачёркнутая обычная цена строкой ниже.
   Показывает js/campaigns.js ([data-campaign-show]), пока активна кампания; без акции — просто «149 000 ₽» */
.price__promo { display: inline-flex; align-items: baseline; gap: 7px; padding: 3px 11px 4px 10px; border-radius: 8px; background: linear-gradient(165deg, var(--lime-3) 0%, var(--lime-2) 42%, var(--lime) 100%); color: var(--ink); font: 700 15px/20px var(--mono); letter-spacing: -.01em; white-space: nowrap; transform: rotate(-3deg); box-shadow: 0 10px 18px -10px rgba(23, 24, 28, .55), inset 0 1px 0 rgba(255, 255, 255, .5); }
.price__promo small { font: 600 12px/16px var(--font); letter-spacing: 0; color: rgba(23, 24, 28, .74); }
.price__promo[hidden], .price__was[hidden] { display: none; }
.price__was s { text-decoration-thickness: 1.5px; text-decoration-color: rgba(200, 54, 47, .75); }
.price__list { grid-area: list; margin-top: 24px; display: grid; gap: 8px; max-width: 420px; font-size: 14px; line-height: 20px; color: rgba(23, 24, 28, .8); }
.price__list li { position: relative; padding-left: 22px; }
.price__list li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--ink); }
.price__bottom { grid-area: bottom; padding-top: 24px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
@media (min-width: 768px) {
  .price__month { font-size: clamp(44px, calc((100cqi - 210px) / 5.9), 56px); white-space: nowrap; }
}
.price__tax { max-width: 320px; font-size: 14px; line-height: 20px; color: rgba(23, 24, 28, .72); }
/* Мини-курсы (JS, ИИ, WordPress): одна цена разовым платежом (владелец, 14.09) — без строк рассрочки и «или N ₽», без миниатюры сертификата
   (сертификатов курсов пока нет, см. FAQ). Главная цифра в .price__month — полная стоимость, .price__terms — «разовым платежом» */
.price--once { grid-template-rows: auto auto auto auto 1fr auto; grid-template-areas: "course ticket" "month ticket" "terms ticket" "list list" ". ." "bottom bottom"; }
.guarantee { min-height: 380px; padding: 40px; display: flex; flex-direction: column; }
.guarantee::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 682px 370px, rgba(199, 255, 46, .22), rgba(199, 255, 46, .14) 110px, rgba(199, 255, 46, 0) 230px); }
.guarantee__eyebrow { position: relative; font-size: 13px; line-height: 16px; font-weight: 500; color: rgba(255, 255, 255, .7); }
.guarantee__title { position: relative; margin-top: 8px; max-width: 600px; font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -.025em; }
.guarantee__text { position: relative; margin-top: 16px; max-width: 520px; font-size: 16px; line-height: 24px; letter-spacing: -.006em; color: var(--muted-2); }
.guarantee__link { position: relative; margin-top: auto; padding-top: 24px; font-size: 14px; line-height: 18px; font-weight: 600; letter-spacing: -.007em; color: var(--lime); }
.guarantee__scan { position: absolute; right: 40px; bottom: -16px; width: 130px; height: 169px; border-radius: 4px; box-shadow: 0 12px 24px -4px rgba(0, 0, 0, .5); transform: rotate(8deg); transition: transform .5s var(--spring); }
/* лицензия крупно: скан — полноценный аргумент, а не марка в углу */
@media (min-width: 768px) {
  .guarantee { padding-right: clamp(40px, 18vw, 300px); }
  .guarantee__scan { right: clamp(28px, 3vw, 48px); bottom: -24px; width: clamp(180px, 15vw, 250px); height: auto; aspect-ratio: 170 / 221; border-radius: 8px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .08); transform: rotate(6deg); }
}
.guarantee:hover .guarantee__scan { transform: rotate(5deg) translateY(-10px); }
/* «Что дальше — флагман» рядом с ценой мини-курса (JS, ИИ, WordPress): та же тёмная плитка, но сеткой — вместо скана лицензии
   в последней строке рядом со ссылкой стоит билет флагмана (.price__ticket), поэтому текст на него не наезжает при любой длине */
.guarantee--next { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr auto; grid-template-areas: "eyebrow eyebrow" "title title" "text text" "link ticket"; align-items: start; padding-right: 40px; }
.guarantee--next .guarantee__eyebrow { grid-area: eyebrow; }
.guarantee--next .guarantee__title { grid-area: title; }
.guarantee--next .guarantee__text { grid-area: text; padding-right: 0; }
.guarantee--next .guarantee__link { grid-area: link; align-self: end; }
.guarantee--next .price__ticket { grid-area: ticket; --tk: 16px; align-self: end; justify-self: end; margin: 24px 0 0 24px; }

/* ---------- FAQ ---------- */
.faq__grid { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 800fr) minmax(0, 592fr); gap: 48px; align-items: start; }
.faq__list { display: grid; gap: 12px; }
.faq__item { border-radius: 18px; background: #E8E4D9; border: 1px solid rgba(184, 178, 166, .8); color: #090A0C; transition: background .35s var(--ease), border-color .35s, color .35s; }
.faq__item.is-open { background: #0E0F13; border-color: rgba(51, 54, 64, .8); color: #F7F7FA; }
.faq__h { font-size: inherit; font-weight: inherit; }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 80px; padding: 28px 24px; border: 0; border-radius: inherit; background: none; text-align: left; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.005em; color: inherit; cursor: pointer; transition: padding .35s var(--ease); }
.faq__q:focus-visible { outline-offset: -3px; }
.is-open .faq__q { padding: 24px 24px 16px; }
.faq__sign { position: relative; flex: none; width: 28px; height: 28px; }
.faq__sign::before, .faq__sign::after { content: ""; position: absolute; left: 6px; top: 13px; width: 16px; height: 2px; border-radius: 1px; background: currentColor; transition: transform .35s var(--ease), background .35s; }
.faq__sign::after { transform: rotate(90deg); }
.is-open .faq__sign::before, .is-open .faq__sign::after { background: var(--lime); }
.is-open .faq__sign::after { transform: rotate(0deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.faq__a > div { min-height: 0; overflow: hidden; }
.faq__a p { padding: 0 24px 24px; max-width: 704px; font-size: 15px; line-height: 23px; color: #A6A8B2; }
.is-open .faq__a { grid-template-rows: 1fr; }
.faq__card { position: sticky; top: 104px; min-height: 256px; padding: 32px; background: linear-gradient(115deg, var(--paper-1) 2%, var(--paper-3) 96%); }
.faq__card-title { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.02em; }
.faq__card-text { margin-top: 12px; max-width: 520px; font-size: 16px; line-height: 24px; letter-spacing: -.006em; color: rgba(23, 24, 28, .72); }
.faq__card .btn { margin-top: 40px; }

/* ---------- Результаты: панель обещания — заявление слева, тайл с цифрами и аватарами справа ---------- */
.promise { padding: 48px 0 0; }
.promise__panel { position: relative; min-height: 464px; padding: 48px 48px 48px 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 40px; align-items: stretch; border-radius: 24px; background: linear-gradient(122deg, var(--paper-1) 2%, var(--paper-2) 55%, var(--paper-3) 96%); box-shadow: var(--shadow-tile); color: var(--ink); }
.promise__main { padding-top: 8px; }
.promise__title { max-width: 900px; font-size: 56px; line-height: 64px; font-weight: 700; letter-spacing: -.028em; }
.promise__lead { margin-top: 32px; max-width: 720px; font-size: 18px; line-height: 26px; letter-spacing: -.008em; color: rgba(23, 24, 28, .72); }
.promise__cta { margin-top: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 16px 20px; }
.promise__cta-note { max-width: 240px; font-size: 15px; line-height: 20px; color: rgba(23, 24, 28, .62); }
.promise__card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 28px; padding: 28px; border-radius: 20px; background: var(--graphite); border: 1px solid rgba(255, 255, 255, .08); color: #fff; box-shadow: 0 18px 36px -12px rgba(0, 0, 0, .5); }
.promise__card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 100% 100%, rgba(199, 255, 46, .22), rgba(199, 255, 46, .12) 120px, rgba(199, 255, 46, 0) 260px); }
.promise__people { position: relative; display: flex; align-items: center; gap: 14px; }
.promise__people .avatars { flex: none; }
.promise__people-text { font-size: 14px; line-height: 20px; color: var(--muted-2); }
.promise__facts { position: relative; margin-top: auto; display: grid; gap: 20px; }
.promise__facts dt { font-size: 32px; line-height: 36px; font-weight: 700; letter-spacing: -.025em; color: var(--lime-2); white-space: nowrap; }
.promise__facts dd { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--muted-2); }

/* ---------- Результаты: было → стало ---------- */
.stories__grid { margin-top: 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.stories__grid .story { grid-column: 1 / -1; max-width: none; }
.story-tile { --glow: 184, 163, 255; min-height: 0; display: flex; flex-direction: column; }
.story-tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 320px 385px, rgba(var(--glow), .22), rgba(var(--glow), .2) 100px, rgba(var(--glow), .1) 150px, rgba(var(--glow), 0) 240px); }
.story-tile--violet { --glow: 184, 163, 255; }
.story-tile--cobalt { --glow: 115, 214, 255; }
.story-tile--lime { --glow: 199, 255, 46; }
.story-tile__head { position: relative; display: flex; align-items: center; gap: 12px; min-height: 70px; } /* роль в две строки (Дмитрий, Вадим) не сдвигает «было/стало» относительно соседей по ряду */
.story-tile__avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .28); object-fit: cover; background: #1F1F21; }
.story-tile__name { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.015em; }
.story-tile__role { display: block; font-size: 14px; line-height: 20px; color: var(--muted-2); }
.story-tile__delta { position: relative; margin-top: 28px; display: grid; }
.story-tile__lbl { font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .6); }
.story-tile__lbl--now { margin-top: 16px; }
.story-tile__was { margin-top: 2px; font: 500 18px/24px var(--mono); letter-spacing: .2px; }
.story-tile__now { margin-top: 2px; font: 500 26px/34px var(--mono); letter-spacing: .2px; color: var(--lime); }
.story-tile__note { font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, .6); } /* «лучший месяц» — рекорд, не стабильный доход */
.story-tile__link { position: relative; margin-top: auto; padding-top: 28px; font-size: 14px; line-height: 18px; font-weight: 600; letter-spacing: -.007em; color: rgba(255, 255, 255, .85); }
.story-tile__play { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; margin-top: auto; padding: 28px 0 0; border: 0; background: none; font: inherit; font-weight: 600; letter-spacing: -.007em; color: var(--lime-2); text-align: left; cursor: pointer; }
.story-tile__play:hover span { text-decoration: underline; }
.story-tile__play svg { flex: none; }
/* Последняя плитка одна в ряду (19 историй = 3×6+1 на ≥1280, 2×9+1 на 768–1279) — растягиваем на ряд и раскладываем в строку, чтобы не висела «сиротой» */
@media (min-width: 1280px) {
  .stories__grid > .story-tile:last-child:nth-child(3n+2) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; column-gap: 40px; }
  .stories__grid > .story-tile:last-child:nth-child(3n+2)::before { background: radial-gradient(circle at 80% 50%, rgba(var(--glow), .22), rgba(var(--glow), .1) 160px, rgba(var(--glow), 0) 320px); }
  .stories__grid > .story-tile:last-child:nth-child(3n+2) .story-tile__head { min-height: 0; }
  .stories__grid > .story-tile:last-child:nth-child(3n+2) .story-tile__delta { margin-top: 0; grid-auto-flow: column; grid-template-rows: auto auto; justify-content: start; column-gap: 40px; }
  .stories__grid > .story-tile:last-child:nth-child(3n+2) .story-tile__lbl--now { margin-top: 0; }
  .stories__grid > .story-tile:last-child:nth-child(3n+2) .story-tile__foot { margin-top: 0; padding-top: 0; flex-direction: row; align-items: center; gap: 24px; justify-self: end; }
}
@media (min-width: 768px) and (max-width: 1279px) {
  .stories__grid > .story-tile:last-child:nth-child(2n) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; column-gap: 32px; }
  .stories__grid > .story-tile:last-child:nth-child(2n)::before { background: radial-gradient(circle at 80% 50%, rgba(var(--glow), .22), rgba(var(--glow), .1) 160px, rgba(var(--glow), 0) 320px); }
  .stories__grid > .story-tile:last-child:nth-child(2n) .story-tile__head { min-height: 0; }
  .stories__grid > .story-tile:last-child:nth-child(2n) .story-tile__delta { margin-top: 0; grid-auto-flow: column; grid-template-rows: auto auto; justify-content: start; column-gap: 32px; }
  .stories__grid > .story-tile:last-child:nth-child(2n) .story-tile__lbl--now { margin-top: 0; }
  .stories__grid > .story-tile:last-child:nth-child(2n) .story-tile__foot { margin-top: 0; padding-top: 0; flex-direction: row; align-items: center; gap: 20px; justify-self: end; }
}

/* Липкая плашка заявки (.sticky-cta, .cta-scope) — в css/cta.css: она есть на всех страницах и на всех ширинах */

/* ---------- Планшет: 768–1279 ---------- */
@media (max-width: 1279px) {
  .code--rows { font-size: 13px; line-height: 20px; }
  .code--rows .code__gutter { font-size: 11px; line-height: 20px; }
  .faq__grid { grid-template-columns: 1fr; gap: 24px; }
  .faq__card { position: static; min-height: 0; }
  .promise__panel { grid-template-columns: 1fr; gap: 32px; padding: 40px; }
  .promise__card { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
  .promise__people { flex: 1 1 100%; }
  .promise__facts { flex: 1 1 100%; margin-top: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .stories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stories__grid .story { grid-column: 1 / -1; max-width: none; }
  .pricing__grid { grid-template-columns: 1fr; }
  .guarantee__text { max-width: 600px; padding-right: 160px; }
}

/* ---------- Мобильный: < 768 ---------- */
@media (max-width: 767px) {
  .code--rows { padding: 16px 0 0 14px; font-size: 12px; line-height: 19px; }
  .code--rows .code__gutter { font-size: 11px; line-height: 19px; }
  .code--rows .code__lines { padding-right: 14px; padding-bottom: 44px; }
  .faq__grid { margin-top: 16px; gap: 16px; }
  .faq__list { gap: 10px; }
  .faq__q { min-height: 76px; padding: 26px 17px; font-size: 15px; line-height: 20px; }
  .is-open .faq__q { padding: 17px 17px 12px; }
  .faq__item.is-open { background: #090A0C; border-color: #383B45; }
  .faq__sign { width: 24px; height: 24px; }
  .faq__sign::before, .faq__sign::after { left: 5px; top: 11px; width: 14px; }
  .faq__a p { padding: 0 17px 20px; font-size: 13px; line-height: 18px; color: #8C8F99; }
  .faq__card { position: static; padding: 22px 24px 24px; }
  .faq__card-title { font-size: 24px; line-height: 30px; }
  .faq__card-text { margin-top: 10px; }
  .faq__card .btn { margin-top: 24px; }
  .promise { padding: 16px 0 0; }
  .promise__panel { min-height: 0; padding: 24px 20px 20px; border-radius: 20px; gap: 24px; }
  .promise__main { padding-top: 0; }
  .promise__title { font-size: 36px; line-height: 42px; }
  .promise__lead { margin-top: 16px; font-size: 16px; line-height: 24px; }
  .promise__cta { margin-top: 24px; }
  .promise__card { padding: 22px 20px 24px; gap: 20px; }
  .promise__facts { grid-template-columns: 1fr; gap: 14px; }
  .promise__facts dt { font-size: 28px; line-height: 32px; }
  .stories__grid { margin-top: 32px; grid-template-columns: 1fr; gap: 16px; }
  .story-tile { min-height: 0; padding: 22px 24px 24px; }
  .story-tile::before { background: radial-gradient(circle at 100% 100%, rgba(var(--glow), .2), rgba(var(--glow), .1) 90px, rgba(var(--glow), 0) 180px); }
  .story-tile__head { min-height: 0; }
  .story-tile__avatar { width: 44px; height: 44px; }
  .story-tile__name { font-size: 18px; line-height: 22px; }
  .story-tile__role { font-size: 13px; line-height: 18px; }
  .story-tile__delta { margin-top: 20px; }
  .story-tile__lbl--now { margin-top: 8px; }
  .story-tile__was { font-size: 16px; line-height: 22px; }
  .story-tile__now { font-size: 24px; line-height: 32px; }
  .story-tile__link { padding-top: 12px; }
  .pricing__grid { margin-top: 32px; gap: 16px; }
  .price, .guarantee { min-height: 0; padding: 24px 22px 28px; }
  /* телефон: билет справа от заголовка в две строки, чуть заходит на поле карточки; сертификат — строкой под списком */
  .price { column-gap: 6px; grid-template-rows: none; grid-template-areas: "course ticket" "month month" "terms terms" "sum sum" "once once" "list list" "cert cert" "bottom bottom"; }
  .price__course { align-self: center; font-size: clamp(15px, 6.4cqi, 22px); line-height: 1.25; }
  .price__month { margin-top: 10px; font-size: 40px; line-height: 46px; }
  .price__sum { margin-top: 20px; font-size: 24px; line-height: 30px; }
  .price__bottom .btn { width: 100%; justify-content: space-between; }
  .guarantee__title { font-size: 26px; line-height: 32px; }
  .guarantee__text { padding-right: 0; }
  .guarantee__link { padding-top: 20px; }
  .guarantee__scan { position: static; margin: 24px 0 0 auto; width: 110px; height: 143px; transform: rotate(6deg); }
}

@media (max-width: 479px) {
  /* Длинные слова заголовка («разработчиков») должны переноситься по словам и на 320 px, а не выезжать за бумагу. */
  .hero__title { font-size: clamp(26px, 9.4vw, 36px); overflow-wrap: anywhere; }
  .hero__title--tight { font-size: clamp(24px, 8vw, 34px); } /* 8.7vw на 320px давало 27.84px — «Веб‑разработчик ✦» (nowrap) 253px не влезал в 236px */
}

/* Тест-драйв (testdrive.html): плейлист уроков в хиро и прогноз заработка; «кому подойдёт» — css/course-blocks.css */
.playlist { display: flex; flex-direction: column; padding: 28px 32px; }
.playlist__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.playlist__head .tile__eyebrow { white-space: nowrap; }
.playlist__total { font: 500 13px/18px var(--mono); color: rgba(255, 255, 255, .6); white-space: nowrap; }
/* Дизайн-контроль: список растёт на высоту бумаги (590) — ряды делят место поровну, подпись внизу; без этого между 4-м уроком и подписью оставалось 143–155 px пустоты на 1280–1536 */
.playlist__list { margin-top: 20px; flex: 1 1 auto; display: flex; flex-direction: column; }
.playlist__item { flex: 1 1 auto; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.playlist__item:first-child { border-top: 0; padding-top: 0; }
.playlist__num { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); font: 500 12px/18px var(--mono); color: rgba(255, 255, 255, .72); }
.playlist__item.is-current .playlist__num { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.playlist__title { display: block; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.playlist__meta { display: block; margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--muted-2); }
.playlist__dur { font: 500 13px/18px var(--mono); color: rgba(255, 255, 255, .6); white-space: nowrap; }
.playlist__foot { margin-top: auto; padding-top: 20px; font-size: 13px; line-height: 18px; color: var(--muted-2); }
@media (min-width: 1280px) {
  .playlist__item { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .playlist__num { width: 44px; height: 44px; }
}
@media (max-width: 1279px) {
}
@media (max-width: 767px) {
  .playlist { padding: 22px; }
  .playlist__item { grid-template-columns: 36px minmax(0, 1fr); align-items: start; }
  .playlist__num { width: 36px; height: 36px; margin-top: -6px; } /* центр номера — на первой строке заголовка (24 px), а не посередине трёх строк */
  .playlist__dur { grid-column: 2; margin-top: 4px; }
}



/* --- Демо флагмана: дипломная работа Fit Studio (реальная работа из галереи) --- */
.demo__result--site { background: radial-gradient(70% 60% at 50% 110%, rgba(70, 160, 237, .2), rgba(70, 160, 237, 0)), #0E0F13; }
.site--fit { background: #fff; }
.site--fit .site__bar { background: #EDF1F5; border-bottom-color: rgba(23, 24, 28, .08); }
.site--fit .site__page { padding: 12px 16px 16px; background: #fff; display: flex; flex-direction: column; }
.site--fit .site__logo { display: flex; flex-direction: column; gap: 1px; font: 700 12px/12px var(--font); letter-spacing: .06em; color: #17181C; }
.site--fit .site__logo span { color: #46A0ED; }
.site__note { font-size: 9.5px; line-height: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #8A9099; }
.site__hero { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 16px; align-items: center; }
.site--fit .site__title { margin: 0; font-size: 19px; line-height: 23px; font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; color: #17181C; }
.site--fit .site__text { margin-top: 8px; font-size: 11.5px; line-height: 16px; color: #6B7280; }
.site--fit .site__btn { margin-top: 14px; height: 30px; padding: 0 14px; border-radius: 4px; background: #46A0ED; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.site__photo { width: 100%; height: auto; border-radius: 6px; display: block; }
.site__strip { margin-top: 14px; width: 100%; height: auto; border-radius: 4px; display: block; }

@media (max-width: 700px) {
  .site--fit .site__title { font-size: 16px; line-height: 20px; }
  .site__hero { grid-template-columns: minmax(0, 1fr); }
  .site__photo { max-height: 128px; object-fit: cover; object-position: 50% 30%; }
}


/* --- Первый экран: у каждого курса свой характер, а не один макет на всех --- */
.hero--js .hero__spark { color: var(--yellow); }
.hero--ai .hero__spark { color: var(--violet); }
.hero--wp .hero__spark { color: var(--cobalt); }
.hero--js .hero__spark { font: 700 .46em/1 var(--mono); letter-spacing: -.04em; }
.hero--ai .hero__spark, .hero--wp .hero__spark { font-size: .5em; }

/* Только от 1280: ниже первый экран у всех курсов встаёт в одну колонку (main.css).
   На min-width: 1024 эти правила перебивали стопку — на 1024–1279 текстовая колонка ужималась
   до 270–300 px, заголовок при обязательных 56 px вылезал из бумаги и ложился поверх демки */
@media (min-width: 1280px) {
  /* Нейросети — демка шире, текст компактнее */
  .hero--ai .hero__inner { grid-template-columns: minmax(0, 560fr) minmax(0, 760fr); }
  .hero--ai .hero__paper { min-height: 540px; }
  /* JavaScript — курс про код, поэтому кода в демке видно больше */
  .hero--js .hero__inner { grid-template-columns: minmax(0, 500fr) minmax(0, 733fr); }
  /* WordPress — админка целиком, без обрезки */
  .hero--wp .hero__inner { grid-template-columns: minmax(0, 520fr) minmax(0, 713fr); }
}

.hero--js .demo__tab.is-active .demo__dot { background: var(--yellow); }
.hero--ai .demo__tab.is-active .demo__dot { background: var(--violet); }
.hero--wp .demo__tab.is-active .demo__dot { background: var(--cobalt); }
.hero--js .demo__result--app { background: radial-gradient(70% 60% at 50% 110%, rgba(247, 223, 30, .14), transparent), #0E0F13; }
.hero--ai .demo__result--draft { background: radial-gradient(70% 60% at 50% 110%, rgba(184, 163, 255, .2), transparent), #0E0F13; }
.hero--wp .demo__result--admin { background: radial-gradient(70% 60% at 50% 110%, rgba(115, 214, 255, .16), transparent), #0E0F13; }

/* кнопка в макете Fit Studio не должна ломаться на две строки */
.site--fit .site__btn { white-space: nowrap; font-size: 9.5px; letter-spacing: .03em; padding: 0 12px; }


/* --- Нейросети: лента инструментов курса --- */
.tools { padding-top: 4px; padding-bottom: 8px; scroll-margin-top: 96px; }
.tools__head { max-width: 720px; }
.tools__title { margin: 0; font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -.02em; }
.tools__note { margin: 10px 0 0; font-size: 15px; line-height: 22px; color: var(--muted-2); }
.tools__row { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tool {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 9px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04); font-size: 15px; line-height: 20px; font-weight: 500;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--spring);
}
.tool--text { padding: 9px 16px; color: var(--muted-2); }
.tool__ico { width: 30px; height: 30px; border-radius: 9px; background: #F4F2EC; display: grid; place-items: center; flex: none; }
.tool__ico img { width: 18px; height: 18px; display: block; }
.tool:hover { border-color: rgba(184, 163, 255, .45); background: rgba(184, 163, 255, .08); transform: translateY(-2px); }

@media (max-width: 700px) {
  .tools__title { font-size: 23px; line-height: 29px; }
  .tools__row { gap: 8px; }
  .tool { padding: 7px 13px 7px 7px; font-size: 14px; }
  .tool--text { padding: 7px 13px; }
  .tool__ico { width: 26px; height: 26px; border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) { .tool:hover { transform: none; } }

/* ---------- Атмосфера страниц курсов ---------- */
/* Цвет фона задан в main.css через :root:has(.hero--*). Здесь — ритм: у каждого курса свет падает со своей стороны,
   поэтому страницы не выглядят одним шаблоном, перекрашенным в другой цвет. */
:root:has(.hero--js) .section { --glow-x: 80%; --glow-x2: 20%; }
:root:has(.hero--js) .section:nth-of-type(even) { --glow-x: 18%; --glow-x2: 82%; }
:root:has(.hero--ai) .section { --glow-x: 50%; --glow-x2: 12%; }
:root:has(.hero--ai) .section:nth-of-type(even) { --glow-x: 12%; --glow-x2: 88%; }
:root:has(.hero--wp) .section { --glow-x: 22%; --glow-x2: 78%; }
:root:has(.hero--wp) .section:nth-of-type(even) { --glow-x: 88%; --glow-x2: 26%; }

/* Единственное место, где фон светится заметнее, — блок цены: решение принимают здесь. */
/* .1 — потолок: выше этого значения серый текст .section__lead в этой секции уходит под 4.5:1 */
.section.pricing { --seam-glow: radial-gradient(46% 100% at 50% 0%, rgba(var(--accent-rgb), .1), rgba(var(--accent-rgb), 0) 74%); --glow-x: 50%; }

/* ---------- Билет курса в карточке цены — «вот что оплачиваешь» ---------- */
/* Текст живой, объём на CSS: сцена с перспективой, графитовый билет с толщиной и лаймовым корешком, позади фиолетовый второй билет.
   Все размеры в em от --tk — билет масштабируется одной переменной. Ширина — 17 кеглей: от ширины карточки минус 380 px (колонке цены остаётся 356 px), 170–272 px.
   Билет — плоский слой с одним 3D-поворотом (без preserve-3d): маска и текст внутри растеризуются вместе и не расходятся */
.price__ticket { grid-area: ticket; align-self: center; justify-self: end; --tk: clamp(10px, calc((100cqi - 380px) / 17), 16px); position: relative; width: 17em; height: 9.6em; font-size: var(--tk); pointer-events: none; }
.price__ticket-scene { position: absolute; inset: 0; perspective: 60em; filter: drop-shadow(0 1.1em 1.1em rgba(23, 24, 28, .26)) drop-shadow(0 .2em .3em rgba(23, 24, 28, .16)); }
.price__ticket-card, .price__ticket-back { position: absolute; inset: 0; transition: transform .7s var(--spring); }
.price__ticket-card { transform: rotateX(14deg) rotateY(-18deg) rotateZ(-4deg); }
.price__ticket-back { background: linear-gradient(145deg, #E3D9FF 0%, var(--violet) 46%, #967BF2 100%); transform: rotateX(14deg) rotateY(-18deg) rotateZ(7deg) translate3d(1.1em, -.9em, -2em); }
/* вырезы-полукруги у линии отрыва: маска из двух половин, у верхней вырез сверху, у нижней — снизу */
.price__ticket-face, .price__ticket-edge, .price__ticket-back {
  --cut: calc(100% - 4.4em);
  position: absolute; inset: 0; border-radius: 1em;
  -webkit-mask: radial-gradient(circle at var(--cut) 0, transparent .5em, #000 calc(.5em + .5px)) top / 100% 51% no-repeat, radial-gradient(circle at var(--cut) 100%, transparent .5em, #000 calc(.5em + .5px)) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle at var(--cut) 0, transparent .5em, #000 calc(.5em + .5px)) top / 100% 51% no-repeat, radial-gradient(circle at var(--cut) 100%, transparent .5em, #000 calc(.5em + .5px)) bottom / 100% 51% no-repeat;
}
.price__ticket-edge { background: #050506; transform: translate(.14em, .3em); }
.price__ticket-face { display: flex; overflow: hidden; color: #fff; background: radial-gradient(11em 7em at 0 0, rgba(184, 163, 255, .24), rgba(184, 163, 255, 0) 70%), linear-gradient(152deg, #2E3038 0%, #1A1B20 46%, #0F1013 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .06); }
/* блик: при наведении на карточку проходит по билету */
.price__ticket-face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(112deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .16) 48%, rgba(255, 255, 255, 0) 58%) 100% 0 / 260% 100% no-repeat; transition: background-position 1s var(--ease); }
.price__ticket-main { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1em 1em 1.05em 1.15em; }
.price__ticket-logo { position: absolute; top: .95em; left: 1.15em; width: 1.55em; height: 1.55em; }
.price__ticket-kind { font-size: .78em; line-height: 1.3; color: rgba(255, 255, 255, .58); }
.price__ticket-name { font-size: 1.1em; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.price__ticket-name i { font-style: normal; font-weight: 600; font-size: .78em; color: var(--lime-2); }
.price__ticket-meta { margin-top: .5em; font-size: .78em; line-height: 1.3; color: rgba(255, 255, 255, .68); white-space: nowrap; }
.price__ticket-stub { position: relative; flex: none; width: 4.4em; display: flex; flex-direction: column; justify-content: space-between; padding: 1em .75em 1.05em .95em; background: linear-gradient(165deg, var(--lime-3) 0%, var(--lime-2) 42%, var(--lime) 100%); color: var(--ink); }
.price__ticket-stub::before { content: ""; position: absolute; left: -1px; top: .75em; bottom: .75em; width: 2px; background: repeating-linear-gradient(to bottom, rgba(23, 24, 28, .42) 0 .32em, rgba(23, 24, 28, 0) .32em .62em); }
.price__ticket-stub span { font-size: .72em; line-height: 1.2; color: rgba(23, 24, 28, .66); }
.price__ticket-stub b { font-size: 1.45em; line-height: 1; font-weight: 700; letter-spacing: -.04em; white-space: nowrap; }
/* параллакс при наведении на карточку: билет выпрямляется и подаётся вперёд, задний билет уходит в сторону; без анимаций — статично */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .price:hover .price__ticket-card, .guarantee--next:hover .price__ticket-card { transform: rotateX(6deg) rotateY(-8deg) rotateZ(-2deg) translate3d(0, -.35em, 1.2em); }
  .price:hover .price__ticket-back, .guarantee--next:hover .price__ticket-back { transform: rotateX(6deg) rotateY(-8deg) rotateZ(10deg) translate3d(1.6em, -1.2em, -2em); }
  .price:hover .price__ticket-face::after, .guarantee--next:hover .price__ticket-face::after { background-position: 0 0; }
}
/* телефон: билет в строке заголовка, заходит на верхнее и правое поле карточки. Кегль — от ширины: заголовку «Веб‑разработчик» остаётся место на 320–767 */
@media (max-width: 767px) {
  .price__ticket { align-self: start; --tk: clamp(6px, calc(2.45cqi + .3px), 9px); margin: -4px -8px 0 0; }
}

/* ---------- Сертификат в карточке цены: миниатюра со ссылкой — под билетом справа, на телефоне строкой под списком ---------- */
/* Аккуратная миниатюра-чип: ровный кадр сертификата + подпись + иконка «развернуть». Сдержанно, не спорит с ценой. */
/* Сертификат — во всю ширину колонки билета: тот же левый и правый край, что у билета над ним, лупа прижата вправо */
.price__cert { grid-area: cert; align-self: center; justify-self: stretch; width: 100%; margin-top: 20px; max-width: 100%; display: flex; align-items: center; gap: 11px; padding: 7px 10px 7px 7px; border: 1px solid rgba(23, 24, 28, .12); border-radius: 13px; background: rgba(255, 255, 255, .5); color: rgba(23, 24, 28, .72); font: inherit; font-size: 13.5px; line-height: 18px; text-align: left; cursor: zoom-in; transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--spring); }
.price__cert-thumb { flex: none; width: 40px; aspect-ratio: 640 / 824; border-radius: 6px; overflow: hidden; background: #0f1013; box-shadow: 0 6px 15px -8px rgba(23, 24, 28, .5), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.price__cert-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.price__cert-label { min-width: 0; font-weight: 600; letter-spacing: -.006em; color: var(--ink); text-wrap: balance; }
.price__cert-zoom { flex: none; margin-left: auto; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: rgba(23, 24, 28, .55); background: rgba(23, 24, 28, .06); transition: color .25s var(--ease), background .25s var(--ease); }
.price__cert:hover { border-color: rgba(23, 24, 28, .2); background: rgba(255, 255, 255, .82); transform: translateY(-1px); }
.price__cert:hover .price__cert-zoom { color: var(--ink); background: rgba(199, 255, 46, .55); }
.price__cert:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* Широкая карточка (контейнер от 880 px — экраны 1920+): билет растёт вместе с карточкой, список — в две колонки,
   чтобы между текстом слева и билетом справа не оставалось пустой середины */
@container (min-width: 880px) {
  .price__ticket { --tk: clamp(16px, calc((100cqi - 660px) / 12), 24px); }
  .price__list { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .price__terms { max-width: 520px; }
}
@media (prefers-reduced-motion: reduce) { .price__cert:hover { transform: none; } }
@media (min-width: 768px) {
  .price__cert { margin-top: 24px; }
}
/* телефон, мини-курсы: карточка без строк «или N ₽» и сертификата; в тёмной плитке билет флагмана — под ссылкой, у правого края */
@media (max-width: 767px) {
  .price--once { grid-template-areas: "course ticket" "month month" "terms terms" "list list" "bottom bottom"; }
  /* билет мини-курса чуть меньше флагманского: заголовку «Нейросети для разработчиков» в две строки хватает колонки на 360–390 px, билет на него не наезжает */
  .price--once .price__ticket { --tk: clamp(6px, calc(2.2cqi + .3px), 8.5px); }
  .guarantee--next { grid-template-columns: minmax(0, 1fr); grid-template-areas: "eyebrow" "title" "text" "link" "ticket"; }
  .guarantee--next .price__ticket { --tk: 10px; margin: 20px 0 0 auto; }
}

/* Сертификат в ответе FAQ на курсах (пока закомментирован в разметке — ждём сертификаты JS, ИИ и WordPress) */
.faq__cert { margin-top: 16px; display: flex; align-items: center; gap: 14px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 14px; line-height: 20px; text-align: left; cursor: zoom-in; }
.faq__cert img { width: 64px; height: auto; aspect-ratio: 640 / 824; border-radius: 4px; box-shadow: 0 10px 20px -8px rgba(23, 24, 28, .55); transform: rotate(-4deg); transition: transform .45s var(--spring); }
.faq__cert span { text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; opacity: .8; }
.faq__cert:hover img { transform: rotate(0) translateY(-3px); }
.faq__cert:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 6px; }

/* ---------- Флагман: как работает рассрочка — объясняем и успокаиваем, не продаём ---------- */
/* Цена и главная кнопка — в карточке выше. Здесь бумажная карточка той же ширины и с теми же полями 40 px, что у карточки цены:
   заголовок → (а) как устроено: факты, банки, Сплит | (б) калькулятор платежа с заказов → план по месяцам (раскрывается) → (в) подпись.
   От 1200 px (а) и (б) — двумя колонками, ниже — одна под другой */
.plan { margin-top: 24px; padding: 40px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "explain" "how" "path" "fine"; }
@media (min-width: 1200px) {
  .plan { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head head" "explain how" "path path" "fine fine"; column-gap: clamp(40px, 3.6vw, 64px); }
}
.plan__head { grid-area: head; min-width: 0; }
.plan__title { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.022em; }
.plan__lead { margin-top: 8px; max-width: 72ch; font-size: 16px; line-height: 24px; color: rgba(23, 24, 28, .72); text-wrap: pretty; }

/* (а) как устроено: четыре факта с иконками, под ними облако банков и Сплит, в конце — вычет и тихая ссылка на заявку */
.plan__explain { grid-area: explain; min-width: 0; margin-top: 28px; display: flex; flex-direction: column; }
.plan__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.plan__fact { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 14px; font-size: 15px; line-height: 22px; color: rgba(23, 24, 28, .72); text-wrap: pretty; }
.plan__fact b { display: block; font-weight: 600; color: var(--ink); }
.plan__icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; border: 1px solid rgba(23, 24, 28, .1); background: rgba(255, 255, 255, .72); color: var(--ink); }
.plan__icon svg { display: block; }

.plan__ways { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
/* банки-партнёры: одинаковые белые плитки, плоские логотипы по центру — без теней, свечений и 3D */
.plan__logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plan__logo { display: grid; place-items: center; height: 54px; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(23, 24, 28, .08); }
.plan__logo img { max-width: 100%; max-height: 24px; width: auto; height: auto; object-fit: contain; }
.plan__logo--more { font-size: 13px; line-height: 17px; font-weight: 500; color: rgba(23, 24, 28, .5); text-align: center; text-wrap: balance; }
/* Яндекс Сплит — второй способ, спокойной строкой в том же ритме, чтобы не спорить с банками */
.plan__split { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: rgba(255, 255, 255, .48); border: 1px solid rgba(23, 24, 28, .08); }
.plan__split-logo { flex: none; width: auto; height: 22px; }
.plan__split-text { font-size: 13px; line-height: 19px; color: rgba(23, 24, 28, .66); }
.plan__split-text b { font-weight: 600; color: var(--ink); }

.plan__foot { margin-top: auto; padding-top: 24px; font-size: 14px; line-height: 20px; color: rgba(23, 24, 28, .66); text-wrap: pretty; }
.plan__foot b { font-weight: 600; color: var(--ink); white-space: nowrap; }
/* заявка — текстовой ссылкой, не кнопкой: главная кнопка экрана — «Оставить заявку» в карточке цены */
.plan__cta { display: block; width: fit-content; margin-top: 6px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(23, 24, 28, .3); text-underline-offset: 3px; white-space: nowrap; transition: text-decoration-color .2s; }
.plan__cta:hover { text-decoration-color: currentColor; }
.plan__cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* (б) калькулятор: срок, два ползунка и ответ — в одной белой карточке, подвинул — ответ тут же под ним */
.plan__how { grid-area: how; min-width: 0; margin-top: 28px; display: flex; flex-direction: column; }
.plan__calc { flex: 1 1 auto; display: grid; align-content: start; gap: 14px; padding: 20px 22px 22px; border-radius: 18px; border: 1px solid rgba(23, 24, 28, .12); background: rgba(255, 255, 255, .56); }
.plan__calc-title { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.012em; }
.plan__term-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(23, 24, 28, .1); }
.plan__terms { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid rgba(23, 24, 28, .14); border-radius: 999px; background: rgba(255, 255, 255, .56); }
.plan__terms-label { padding: 0 8px 0 12px; font-size: 14px; line-height: 20px; color: rgba(23, 24, 28, .6); }
.plan__term { height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: none; color: rgba(23, 24, 28, .76); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.plan__term:hover { color: var(--ink); background: rgba(23, 24, 28, .06); }
.plan__term[aria-pressed="true"] { background: var(--graphite); color: #fff; font-weight: 600; }
.plan__term:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 999px; }
/* платёж по выбранному сроку — строкой, не крупной ценой: цена уже в карточке выше. Справа от срока; если не помещается — строкой под ним, слева */
.plan__how { container-type: inline-size; }
.plan__pay { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
@container (max-width: 559px) {
  .plan__pay { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 10px; text-align: left; }
}
.plan__pay b { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan__pay > span { font-size: 13px; line-height: 18px; color: rgba(23, 24, 28, .6); white-space: nowrap; }
.plan__approx { margin-right: .12em; font-weight: 500; color: rgba(23, 24, 28, .5); }

.plan__field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; }
.plan__label { font-size: 14px; line-height: 20px; font-weight: 500; color: rgba(23, 24, 28, .66); }
.plan__val { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* коралловая черта — легенда: такая же отмечает цель на полосах дохода */
.plan__val--goal::before { content: ""; display: inline-block; width: 3px; height: 15px; margin-right: 8px; border-radius: 2px; background: var(--coral); vertical-align: -1px; }
.plan__result { padding-top: 16px; border-top: 1px solid rgba(23, 24, 28, .1); }
.plan__key { font-size: 18px; line-height: 26px; letter-spacing: -.012em; color: rgba(23, 24, 28, .8); text-wrap: pretty; }
.plan__key b { font-weight: 700; color: var(--ink); }
.plan__key mark { padding: 0 .18em; border-radius: .2em; background: var(--lime); color: var(--ink); font-weight: 700; white-space: nowrap; }
.plan__goal { margin-top: 8px; font-size: 14px; line-height: 21px; color: rgba(23, 24, 28, .7); text-wrap: pretty; }

/* Окупаемость: за сколько месяцев работы заработок перекрывает полную стоимость + переключатель досрочного гашения */
.plan__payback { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(23, 24, 28, .14); background: rgba(255, 255, 255, .62); }
.plan__payback-line { font-size: 15.5px; line-height: 23px; letter-spacing: -.008em; color: rgba(23, 24, 28, .8); text-wrap: pretty; }
.plan__payback-line b { font-weight: 700; color: var(--ink); white-space: nowrap; }
.plan__payback-line mark { padding: 0 .2em; border-radius: .2em; background: var(--lime); color: var(--ink); font-weight: 700; }
.plan__early { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; line-height: 20px; color: rgba(23, 24, 28, .8); }
.plan__early input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.plan__early-box { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid rgba(23, 24, 28, .3); background: rgba(255, 255, 255, .7); color: transparent; transition: background .2s, border-color .2s, color .2s; }
.plan__early-box svg { display: block; }
.plan__early input:checked + .plan__early-box { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.plan__early input:focus-visible + .plan__early-box { outline: 2px solid var(--ink); outline-offset: 2px; }
.plan__early-text { font-weight: 500; }
.plan__payback-note { font-size: 13px; line-height: 19px; color: rgba(23, 24, 28, .62); text-wrap: pretty; }

/* ползунок: графитовая заливка до значения (--p из js/installment.js), лаймовая ручка */
.plan__range { --p: .14; grid-column: 1 / -1; width: 100%; height: 32px; margin: 2px 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.plan__range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--graphite) calc(13px + (100% - 26px) * var(--p)), rgba(23, 24, 28, .14) 0); }
.plan__range::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10px; border: 2px solid var(--graphite); border-radius: 50%; background: var(--lime-2); box-shadow: 0 6px 12px -4px rgba(23, 24, 28, .45); -webkit-appearance: none; appearance: none; transition: transform .25s var(--spring); }
.plan__range:active::-webkit-slider-thumb { transform: scale(1.12); }
.plan__range::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(23, 24, 28, .14); }
.plan__range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--graphite); }
.plan__range::-moz-range-thumb { width: 22px; height: 22px; border: 2px solid var(--graphite); border-radius: 50%; background: var(--lime-2); box-shadow: 0 6px 12px -4px rgba(23, 24, 28, .45); }
.plan__range:focus-visible { outline: none; }
.plan__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(23, 24, 28, .22); }
.plan__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(23, 24, 28, .22); }

/* План по месяцам: заметная вторичная кнопка (не лаймовая — Primary экрана в карточке цены). Раскрывает план на всю ширину под колонками (js/installment.js) */
.plan__more { display: flex; align-items: center; gap: 8px 16px; width: 100%; padding: 13px 16px 13px 18px; border: 1px solid rgba(23, 24, 28, .2); border-radius: 14px; background: rgba(255, 255, 255, .7); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.plan__more:hover { border-color: rgba(23, 24, 28, .4); background: #fff; box-shadow: 0 6px 16px -10px rgba(23, 24, 28, .45); transform: translateY(-1px); }
.plan__more:active { transform: translateY(0); }
.plan__more:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.plan__more-label { font-size: 15.5px; line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
.plan__more-hint { flex: 1 1 auto; font-size: 13px; line-height: 18px; color: rgba(23, 24, 28, .55); text-align: right; }
.plan__more-chevron { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--graphite); color: #fff; }
.plan__more-chevron svg { display: block; transition: transform .3s var(--spring); }
.plan__more[aria-expanded="true"] .plan__more-chevron svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .plan__more, .plan__more-chevron svg { transition: none; } }
.plan__path { grid-area: path; min-width: 0; margin-top: 28px; padding-top: 28px; border-top: 1px solid rgba(23, 24, 28, .12); }

/* путь: учёба → 1-й / 2-й / 3-й месяц работы → дальше; точки на линии — вертикальной, от 1200 px — горизонтальной */
.plan__road { display: grid; }
.plan__step { position: relative; min-width: 0; padding: 0 0 26px 28px; }
.plan__step:last-child { padding-bottom: 0; }
.plan__step::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--violet); }
.plan__step::after { content: ""; position: absolute; left: 5px; top: 24px; bottom: 6px; width: 2px; border-radius: 1px; background: rgba(23, 24, 28, .12); }
.plan__step:last-child::after { content: none; }
.plan__step--study::before { background: var(--lime); box-shadow: inset 0 0 0 1.5px rgba(23, 24, 28, .32); }
.plan__step--next::before { background: none; box-shadow: inset 0 0 0 2px rgba(23, 24, 28, .3); }
.plan__step.is-goal::before { background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 102, 97, .2); }
.plan__step-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.plan__step-name { font-size: 15px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.plan__step-sum { font-size: 17px; line-height: 24px; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan__goal-tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 12px; line-height: 20px; font-weight: 600; vertical-align: 1px; }
.plan__step-text { margin-top: 10px; font-size: 14px; line-height: 21px; color: rgba(23, 24, 28, .7); text-wrap: pretty; }
.plan__step-text b { font-weight: 600; color: var(--ink); white-space: nowrap; }
.plan__step-text [data-plan-left] { display: block; margin-top: 4px; color: rgba(23, 24, 28, .8); }
.plan__step-text [data-plan-left] > span { display: block; }

/* учёба: клетка — месяц рассрочки; 1-й — лаймовый 0 ₽, дальше графитовый платёж */
.plan__cells { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 3px; height: 30px; margin-top: 10px; }
.plan__cell { display: grid; place-items: center; min-width: 0; overflow: hidden; border-radius: 7px; background: var(--graphite); color: #fff; font-size: 12px; line-height: 1; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan__cell--free { background: var(--lime); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(23, 24, 28, .22); }
.plan__cell.is-half { background: linear-gradient(90deg, var(--graphite) 50%, rgba(19, 20, 23, .45) 50%); }
.plan__cells.is-dense { gap: 2px; }
.plan__cells.is-dense .plan__cell { font-size: 0; border-radius: 5px; }
@media (prefers-reduced-motion: no-preference) {
  .plan__cell { animation: plan-in .4s var(--spring) both; animation-delay: calc(var(--i, 0) * 30ms); }
}
@keyframes plan-in { from { transform: scaleY(.3); opacity: 0; } }
.plan__marks { margin-top: 8px; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 16px; font-weight: 500; color: rgba(23, 24, 28, .56); }
.plan__mark-orders { color: #5B43C7; white-space: nowrap; }
.plan__mark-orders::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--violet); vertical-align: 0; }

/* полоса дохода месяца на шкале 0–100 тыс.: платёж (графит) → остаток по нижней границе (лайм) → вилка (штриховка); коралловая черта — цель */
.plan__meter { --pay: .0625; --lo: .2; --hi: .3; --goal: 1; position: relative; height: 14px; margin-top: 10px; }
.plan__meter-track { position: absolute; inset: 0; overflow: hidden; border-radius: 7px; background: rgba(23, 24, 28, .08); }
.plan__meter-track i { position: absolute; top: 0; bottom: 0; transition: left .45s var(--ease), width .45s var(--ease); }
.plan__meter-pay { left: 0; width: calc(var(--pay) * 100%); background: var(--graphite); }
.plan__meter-left { left: calc(var(--pay) * 100%); width: calc((var(--lo) - var(--pay)) * 100%); background: var(--lime); }
.plan__meter-fork { left: calc(var(--lo) * 100%); width: calc((var(--hi) - var(--lo)) * 100%); background: repeating-linear-gradient(-45deg, var(--lime) 0 4px, var(--lime-3) 4px 8px); box-shadow: inset 0 0 0 1px rgba(23, 24, 28, .08); }
.plan__meter-goal { position: absolute; top: -5px; bottom: -5px; left: calc(var(--goal) * 100%); width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--coral); box-shadow: 0 0 0 2px rgba(254, 253, 249, .9); transition: left .45s var(--ease), opacity .3s; }
.plan__meter.is-over .plan__meter-goal { opacity: 0; }
.plan__axis { margin-top: 8px; display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; color: rgba(23, 24, 28, .5); font-variant-numeric: tabular-nums; }
/* цветные квадраты в тексте — легенда полосы */
.plan__sw { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2px; background: var(--lime); box-shadow: inset 0 0 0 1px rgba(23, 24, 28, .2); vertical-align: 0; font-style: normal; }
.plan__sw--pay { background: var(--graphite); box-shadow: none; }

/* дальше: цель выше 100 тыс. — реальная история вместо цифр */
.plan__story { margin-top: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; border: 1px solid rgba(23, 24, 28, .1); background: #fff; color: inherit; text-decoration: none; box-shadow: 0 8px 18px -12px rgba(23, 24, 28, .35); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.plan__story:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -14px rgba(23, 24, 28, .45); }
.plan__story:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.plan__story-av { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.plan__story-body { display: grid; min-width: 0; }
.plan__story-name { font-size: 15px; line-height: 20px; font-weight: 600; }
.plan__story-role { font-size: 13px; line-height: 18px; color: rgba(23, 24, 28, .6); }
.plan__story-nums { margin-top: 2px; font-size: 14px; line-height: 20px; color: rgba(23, 24, 28, .66); font-variant-numeric: tabular-nums; }
.plan__story-nums b { padding: 0 .2em; border-radius: .2em; background: var(--lime); color: var(--ink); font-weight: 700; white-space: nowrap; }
.plan__story-go { font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; }

/* (в) подпись: мелко и спокойно, но на виду — под калькулятором и планом */
.plan__fine { grid-area: fine; position: relative; margin-top: 28px; padding-left: 26px; font-size: 13px; line-height: 19px; color: rgba(23, 24, 28, .62); text-wrap: pretty; }
.plan__fine::before { content: "!"; position: absolute; left: 0; top: 1px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--graphite); color: var(--lime); font-size: 11px; line-height: 1; font-weight: 700; }

/* планшет и узкий десктоп: ползунки калькулятора — рядом; шаг плана в две колонки — заголовок и полоса слева, текст справа */
@media (min-width: 768px) and (max-width: 1199px) {
  .plan__calc { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .plan__calc-title, .plan__term-row, .plan__result, .plan__more { grid-column: 1 / -1; }
  .plan__step { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: clamp(24px, 3.4vw, 40px); align-content: start; }
  .plan__step > * { grid-column: 1; }
  .plan__step > .plan__step-text { grid-column: 2; grid-row: 1 / span 4; margin-top: 2px; }
  .plan__step--next > .plan__step-text { grid-row: 1; }
  .plan__step > .plan__story { grid-column: 2; grid-row: 2; }
}
@media (min-width: 1200px) {
  .plan__road { grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr)) minmax(0, .9fr); column-gap: clamp(24px, 2.2vw, 36px); }
  .plan__step, .plan__step:last-child { padding: 30px 0 0; }
  .plan__step::before { top: 0; }
  .plan__step::after { top: 5px; bottom: auto; left: 22px; right: calc(clamp(24px, 2.2vw, 36px) * -1 + 10px); width: auto; height: 2px; }
  .plan__step-head { flex-direction: column; align-items: flex-start; gap: 0; }
  .plan__step-sum { font-size: 20px; line-height: 28px; }
  /* узкая колонка: аватар с именем строкой, остальное под ними на всю ширину */
  .plan__story { grid-template-columns: 40px minmax(0, 1fr); gap: 6px 10px; padding: 12px; }
  .plan__story-av { width: 40px; height: 40px; }
  .plan__story-body { display: contents; }
  .plan__story-name { grid-column: 2; align-self: center; }
  .plan__story-role, .plan__story-nums, .plan__story-go { grid-column: 1 / -1; }
  .plan__story-nums { margin-top: 0; }
}
@media (min-width: 1200px) and (max-width: 1439px) {
  .plan__step-text { font-size: 13px; line-height: 19px; }
  /* узкий десктоп: колонке фактов — чуть больше места, калькулятору хватает и 460 px; факты — компактнее */
  .plan { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
  .plan__fact { gap: 12px; grid-template-columns: 32px minmax(0, 1fr); font-size: 14px; line-height: 21px; }
  .plan__icon { width: 32px; height: 32px; border-radius: 10px; }
}

/* телефон: всё одной колонкой, срок — на всю ширину карточки калькулятора */
@media (max-width: 767px) {
  .plan { margin-top: 16px; padding: 24px 20px 24px; }
  .plan__title { font-size: 22px; line-height: 28px; }
  .plan__lead { font-size: 15px; line-height: 22px; }
  .plan__explain { margin-top: 20px; }
  .plan__facts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .plan__fact { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; font-size: 14px; line-height: 20px; }
  .plan__icon { width: 32px; height: 32px; border-radius: 10px; }
  .plan__ways { margin-top: 20px; }
  .plan__logo { padding: 8px 6px; }
  .plan__foot { padding-top: 20px; }
  .plan__how { margin-top: 24px; }
  .plan__calc { gap: 10px; padding: 16px; }
  .plan__term-row { padding-bottom: 14px; }
  .plan__terms { width: 100%; justify-content: space-between; }
  .plan__term { flex: 1 1 0; height: 40px; padding: 0 8px; }
  .plan__key { font-size: 17px; line-height: 24px; }
  .plan__range { height: 44px; margin: 0; }
  .plan__more { padding: 12px 14px 12px 16px; }
  .plan__more-hint { display: none; }
  .plan__path { margin-top: 24px; padding-top: 24px; }
  .plan__step { padding-left: 24px; }
  .plan__step-head { flex-wrap: wrap; }
  .plan__story { grid-template-columns: auto minmax(0, 1fr); }
  .plan__story-go { grid-column: 2; }
}
