/*
 * LeadTide: стили страниц чек-листа, курса, 404, оферты и политики.
 * Подключается после site.css и пользуется его переменными. Семейства шрифтов здесь не названы:
 * только var(--font-display) и var(--font-text).
 */

/* короткая надпись кнопки в шапке не переносится на вторую строку */
.top-cta .cta-short { white-space: nowrap; }
/* на телефоне шапка в одну строку и слово LeadTide не наезжает на меню: прячем «Под ключ»,
   на главную ведёт логотип (пункт есть и в подвале) */
@media (max-width: 599px) {
  .top:has(.top-cta-all) .nav a:first-child { display: none; }
}
/* у 404 ссылки от корня: «Курс» на телефоне прячем так же, как site.css прячет kurs.html */
@media (max-width: 599px) {
  .nav a[href="/kurs.html"]:not([aria-current]) { display: none; }
}

/* ---------- первый экран внутренних страниц ---------- */
.p-hero { padding-block: clamp(1.5rem, 0.75rem + 3.5vw, 4rem) clamp(2rem, 1rem + 4vw, 5rem); }
.p-hero-grid { display: grid; gap: clamp(1.75rem, 1rem + 3vw, 4rem); align-items: center; }
@media (min-width: 900px) { .p-hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
/* чек-лист: заголовку больше места, чтобы «без слива бюджета» не рвался на четыре строки */
@media (min-width: 1100px) { .p-hero-grid.has-sheet { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); } }
.p-hero h1 em { font-style: normal; color: var(--orange); }
.p-hero .lead { margin-top: clamp(0.875rem, 0.5rem + 1.5vw, 1.5rem); }
.p-hero .cta-row { margin-top: clamp(1.25rem, 0.75rem + 2vw, 2rem); }
/* цена рядом с кнопкой: крупное число и короткая подпись */
.cta-free { display: flex; align-items: baseline; gap: 0.5rem; max-width: none; font-size: var(--step-small); color: var(--on-navy-muted); }
.cta-free b { font: 900 1.75rem/1 var(--font-display); letter-spacing: -0.04em; color: var(--on-navy); }
.cta-note { margin-top: 0.75rem; font-size: var(--step-small); line-height: 1.45; color: var(--on-navy-muted); }
.p-hero .marks-list { max-width: 62ch; margin-top: clamp(1.25rem, 0.75rem + 2vw, 2rem); padding-top: clamp(1.25rem, 0.75rem + 2vw, 2rem); border-top: 1px solid var(--navy-line); font-size: 1rem; line-height: 1.45; color: var(--on-navy-muted); }
.p-hero .marks-list b { color: var(--on-navy); }
.p-hero .status { margin-bottom: clamp(1rem, 0.75rem + 1vw, 1.5rem); }

/* ---------- листок чек-листа с настоящим содержанием ----------
   Обёртка держит второй лист позади: в PDF две страницы. */
.sheet-wrap { position: relative; isolation: isolate; width: 100%; max-width: 26.5rem; margin-inline: auto; }
.sheet-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 4px; background: #C6CFE2; transform: rotate(2deg); }
.sheet { position: relative; counter-reset: chk; background: var(--white); color: var(--ink); border-radius: 4px; padding: 1.5rem 1.25rem 1.125rem; font-size: var(--step-min); line-height: 1.3; }
.sheet p { max-width: none; }
.sheet-k { font-weight: 700; color: var(--ink-muted); }
.sheet-t { margin-top: 0.375rem; max-width: 15ch; font: 900 clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem)/1.05 var(--font-display); letter-spacing: -0.04em; }
.sheet-g { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; padding-bottom: 0.375rem; border-bottom: 1px solid var(--line); font-weight: 800; }
.sheet-g::before { content: ""; flex: none; width: 10px; height: 4px; border-radius: var(--mark-radius); background: var(--orange); }
.sheet-list { list-style: none; padding: 0; margin-top: 0.5rem; display: grid; gap: 0.4375rem; }
.sheet-list li { counter-increment: chk; display: grid; grid-template-columns: 1rem 1.25rem minmax(0, 1fr); gap: 0.5rem; align-items: start; font-weight: 600; }
.sheet-list li::before { content: ""; order: -2; width: 1rem; height: 1rem; margin-top: 0.0625rem; border: 2px solid var(--ink); border-radius: 2px; }
.sheet-list li::after { content: counter(chk); order: -1; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.sheet-f { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: 0.5rem; border-top: 1px solid var(--line); color: var(--ink-muted); }
@media (min-width: 900px) {
  .p-hero .sheet-wrap { transform: rotate(-2deg); }
  .p-hero .sheet-wrap::before { transform: rotate(4deg) translate(0.5rem, 0.25rem); }
  .p-hero .sheet { padding: 1.75rem 1.5rem 1.25rem; }
}
/* уменьшенный листок для финалов: три блока проверок вместо двенадцати строк */
.sheet-wrap.is-small { max-width: 15rem; transform: rotate(3deg); }
.sheet-wrap.is-small::before { transform: rotate(-5deg); }
.is-small .sheet { padding: 1.125rem 1rem 0.875rem; }
.is-small .sheet-t { font-size: 1.5rem; }
.sheet-groups { list-style: none; padding: 0; margin-top: 0.875rem; display: grid; }
.sheet-groups li { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding-block: 0.4375rem; border-top: 1px solid var(--line); font-weight: 700; }
.sheet-groups .num { font-weight: 400; color: var(--ink-muted); }
.is-small .sheet-f { margin-top: 0; }

/* ---------- чек-лист: что в полной версии ---------- */
.full-grid { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: start; }
@media (min-width: 900px) {
  .full-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .full-copy { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.full-copy .section-head { margin-bottom: 1.25rem; }
.full-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; max-width: none; }
.full-price b { font: 900 clamp(2.5rem, 2rem + 2.5vw, 4rem)/1 var(--font-display); letter-spacing: -0.05em; }
.full-price span { color: var(--ink-muted); }
.full-how { margin-top: 0.75rem; font-size: var(--step-small); color: var(--ink-muted); }
.full-copy .btn { margin-top: 1.25rem; }
.toc { list-style: none; padding: 0; counter-reset: toc; border-top: 2px solid var(--ink); }
.toc li { counter-increment: toc; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 0.5rem; padding-block: 0.75rem; border-bottom: 1px solid var(--line); }
.toc li::before { content: counter(toc, decimal-leading-zero); grid-row: span 2; font: 900 1.25rem/1.2 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.toc h3 { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
.toc p { grid-column: 2; max-width: none; margin-top: 0.125rem; font-size: var(--step-small); line-height: 1.4; color: var(--ink-muted); }

/* ---------- строка кейса: одна фраза с цифрами и ссылка на скрин на главной ----------
   Полосы 278 → 76 живут только на главной; здесь факт типографикой и одной отметкой. */
.case-band { padding-block: clamp(2.25rem, 1.25rem + 4vw, 4.5rem); }
.case-line { display: grid; gap: 0.75rem; justify-items: start; }
.case-line-t { position: relative; max-width: 34ch; padding-left: calc(10px + 0.875rem); font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem); font-weight: 900; line-height: 1.12; }
.case-line-t::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 4px; border-radius: var(--mark-radius); background: var(--orange); }
.case-line-t span { display: block; color: var(--ink-muted); font-weight: 800; }
.case-line .textlink { margin-left: calc(10px + 0.875rem); }
/* на широком экране ссылка справа по нижней строке: без пустого правого поля */
@media (min-width: 900px) {
  .case-line { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 3rem; }
  .case-line .textlink { margin-left: 0; }
}

/* ---------- финал внутренних страниц: текст, кнопки и листок ---------- */
.p-final-grid { display: grid; gap: 2rem; align-items: center; }
.p-final .lead { margin-top: 1rem; }
.p-final .cta-row { margin-top: clamp(1.25rem, 0.75rem + 2vw, 2rem); }
/* на телефоне листок целиком, небольшой, под кнопками */
.p-final-doc { display: grid; justify-items: start; padding: 0.5rem 0 0.5rem 0.75rem; }
.p-final-doc .sheet-wrap.is-small { max-width: 13.5rem; margin-inline: 0; }
@media (min-width: 800px) {
  .p-final-grid { grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 5vw, 5rem); }
  .p-final-doc { width: 17rem; padding: 1rem 0; place-items: center; }
  .p-final-doc .sheet-wrap.is-small { max-width: 15rem; margin-inline: auto; }
}

/* ---------- курс: содержание из четырёх модулей в первом экране ----------
   Номер, название и тонкая линия, как оглавление. Повторяет программу ниже, поэтому скрыто
   от читалок и на телефоне, где программа идёт сразу следом. */
.mods-box { display: none; }
@media (min-width: 700px) {
  .p-hero-grid.has-mods { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
  .mods-box { display: block; }
}
.mods-k { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; font-size: var(--step-small); font-weight: 700; color: var(--on-navy-muted); }
.mods-k::before { content: ""; flex: none; width: 10px; height: 4px; border-radius: var(--mark-radius); background: var(--orange); }
.mods { list-style: none; padding: 0; border-top: 1px solid var(--navy-line); }
.mods li { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); align-items: baseline; padding-block: clamp(0.875rem, 0.5rem + 0.8vw, 1.25rem); border-bottom: 1px solid var(--navy-line); }
.mods .n { font: 900 1rem/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--orange); }
.mods .t { font: 800 clamp(1.25rem, 0.9rem + 1vw, 1.75rem)/1.1 var(--font-display); letter-spacing: -0.025em; }

/* ---------- курс: программа, обычная сетка модулей с номерами и тонкими линиями ---------- */
.modules { list-style: none; padding: 0; display: grid; counter-reset: mod; border-top: 1px solid var(--ink); }
.modules li { counter-increment: mod; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); align-content: start; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.modules li::before { content: counter(mod, decimal-leading-zero); grid-row: span 2; font: 900 1.25rem/1.2 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.modules h3 { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); }
.modules p { grid-column: 2; max-width: none; margin-top: 0.375rem; font-size: 1rem; line-height: 1.45; color: var(--ink-muted); }
@media (min-width: 900px) {
  .modules { grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .modules li { grid-template-columns: minmax(0, 1fr); padding: 1.5rem 1.5rem 1.75rem; border-bottom: 0; border-left: 1px solid var(--line); }
  .modules li:first-child { padding-left: 0; border-left: 0; }
  .modules li::before { grid-row: auto; margin-bottom: 1.25rem; font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem); line-height: 1; letter-spacing: -0.05em; }
  .modules p { grid-column: auto; }
}

/* ---------- курс: тарифы одной высоты, кнопки по нижнему краю ---------- */
.plans { display: grid; gap: 1rem; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; padding: clamp(1.25rem, 0.9rem + 2vw, 2.25rem); border-radius: var(--radius); background: var(--paper); }
.plan.dark { background: var(--navy); }
.plan h3 { font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.125rem); font-weight: 800; letter-spacing: -0.03em; }
.plan-price { font: 900 clamp(2.5rem, 1.5rem + 4vw, 4rem)/1 var(--font-display); letter-spacing: -0.05em; }
.plan .marks-list { flex: 1; align-content: start; }
.plan .btn { margin-top: auto; }
.plans + .fallback { margin-top: 1rem; }

/* ---------- 404: отлив ---------- */
/* страница на всю высоту окна: под коротким подвалом не остаётся светлой полосы */
.nf-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.nf-main { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; padding-block: clamp(2rem, 1rem + 5vw, 5rem); }
/* код ошибки приглушён: оранжевыми остаются только четыре отметки и кнопка */
.nf-code { font: 900 var(--step-giant)/0.85 var(--font-display); letter-spacing: -0.06em; color: var(--on-navy-muted); }
.nf-main h1 { margin-top: 1rem; font-size: var(--step-h2); }
.nf-main .lead { margin-top: 0.75rem; color: var(--on-navy-muted); }
.nf-main .tide { margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.nf-cap { max-width: none; margin-top: 0.75rem; font-size: var(--step-min); color: var(--on-navy-muted); }
.nf-main .cta-row { margin-top: clamp(1.25rem, 0.75rem + 2vw, 2rem); }
/* какие штрихи горят в отливе (199–202, нижний ряд сетки 33×7), задаёт site.css вместе с самим полем */
.foot-short .foot-legal { margin-top: 0; padding-top: 0; border-top: 0; }
/* на телефоне 404 помещается в один экран 360 × 740 */
@media (max-width: 599px) {
  .nf-main { padding-block: 1.25rem 1.5rem; }
  .nf-code { font-size: 4.5rem; }
  .nf-main h1 { margin-top: 0.75rem; }
  .nf-main .tide { margin-top: 1.25rem; }
  .nf-main .cta-row { margin-top: 1rem; }
}

/* ---------- оферта и политика ---------- */
.legal { counter-reset: sec; background: var(--white); font-size: 1.0625rem; line-height: 1.65; overflow-wrap: break-word; }
.legal ol + p, .legal ul + p { margin-top: 0.75rem; }
.legal .idx { margin-bottom: 0.75rem; }
.legal h1 { max-width: 21ch; margin-bottom: 0.75rem; text-wrap: balance; }
.legal-date { font-size: var(--step-small); color: var(--ink-muted); }
.legal .legal-note { max-width: none; margin-block: 1.5rem 0; background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; line-height: 1.5; }
.legal h2 { counter-increment: sec; margin: 2.25rem 0 0.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.legal p, .legal li { max-width: 68ch; }
.legal ol, .legal ul { list-style: none; padding: 0; }
.legal ol { counter-reset: item; }
/* номера пунктов вида 2.1: номер раздела берётся из счётчика заголовков */
.legal ol > li { counter-increment: item; position: relative; padding-left: 3rem; }
.legal ol > li::before { content: counter(sec) "." counter(item); position: absolute; left: 0; top: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.legal ul > li { position: relative; padding-left: 1.5rem; }
.legal ul > li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 10px; height: 4px; border-radius: var(--mark-radius); background: var(--orange); }
.legal a { font-weight: 700; }
/* поле, которое владелец заполнит перед публикацией: светлая подложка и оранжевая линия снизу */
.legal .fill { padding: 0.0625em 0.125em; border-radius: 2px 2px 0 0; background: var(--orange-tint); box-shadow: inset 0 -2px 0 var(--orange); font-weight: 600; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (max-width: 599px) {
  .legal { font-size: 1rem; line-height: 1.6; }
  .legal ol > li { padding-left: 2.5rem; }
}

/* ---------- печать оферты и политики: только текст документа, чёрным по белому ---------- */
@media print {
  @page { margin: 18mm 16mm; }
  .top, .foot, .cookie, .skip, .btn, button { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  .legal { padding: 0 !important; background: #fff !important; color: #000 !important; font-size: 11pt; line-height: 1.5; }
  .legal * { color: #000 !important; }
  .legal .wrap { max-width: none; padding-inline: 0; }
  .legal p, .legal li { max-width: none; }
  .legal h2 { break-after: avoid; page-break-after: avoid; border-top-color: #000; }
  .legal li, .legal p { break-inside: avoid; }
  .legal .idx::before, .legal ul > li::before { background: #000 !important; }
  .legal .legal-note { padding: 0.5rem 0.75rem; background: none !important; border: 1px solid #000; border-radius: 0; }
  /* поле для заполнения: рамка вместо цвета */
  .legal .fill { background: none !important; box-shadow: none !important; border: 1px solid #000; border-radius: 0; font-weight: 400; }
  .legal a { font-weight: 400; text-decoration: none; }
}