/* Сертификат (/sertifikat/): стили страниц поверх дизайн-системы ui.css.
   Только собственные блоки с префиксом cf-; кнопки, карточки, поля, бейджи — из ui.css. */

.cf-page { padding-top: var(--ui-s6); }
.cf-page > * + * { margin-top: var(--ui-s10); }
.cf-page .ui-section__title { font-size: 26px; letter-spacing: -.01em; }
.cf-lead { margin: 0; color: var(--ui-muted); max-width: 64ch; }

/* Крошки — как на витрине обучения */
.cf-breadcrumbs { padding: 0; font-size: var(--ui-fs-sm); color: var(--ui-muted); }
.cf-page > .cf-breadcrumbs + * { margin-top: var(--ui-s6); }
.cf-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; padding: 0; list-style: none; }
.cf-breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; }
.cf-breadcrumbs li + li::before { content: "›"; opacity: .55; }
.cf-breadcrumbs a { color: var(--ui-ink-2); text-decoration: none; }
.cf-breadcrumbs a:hover { text-decoration: underline; }

/* Герой: текст слева, образец сертификата справа */
.cf-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: var(--ui-s10); align-items: center; }
.cf-hero__copy { display: grid; gap: var(--ui-s3); }
.cf-hero__actions { display: flex; flex-wrap: wrap; gap: var(--ui-s2); margin-top: var(--ui-s2); }
.cf-hero__note { margin: 0; font-size: var(--ui-fs-sm); color: var(--ui-muted); max-width: 60ch; }

/* Образец сертификата — рисуется CSS, без картинки */
.cf-sample { position: relative; aspect-ratio: 210 / 297; max-height: 460px; margin: 0 auto; background: #fff; border: 1.5px solid var(--ui-primary); border-radius: 6px; box-shadow: 0 12px 30px rgba(29, 28, 25, .08); padding: 8%; display: grid; grid-template-rows: auto 1fr auto; text-align: center; color: var(--ui-ink); }
.cf-sample::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--ui-primary-line); border-radius: 4px; pointer-events: none; }
.cf-sample__head { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ui-muted); }
.cf-sample__head img { width: 22px; height: 22px; border-radius: 6px; }
.cf-sample__body { display: grid; align-content: center; gap: 6px; }
.cf-sample__title { font-size: clamp(18px, 2.4vw, 26px); font-weight: 700; letter-spacing: .12em; }
.cf-sample__sub { font-size: 12px; color: var(--ui-ink-2); }
.cf-sample__who { font-size: 11px; color: var(--ui-muted); margin-top: 8px; }
.cf-sample__name { font-size: clamp(15px, 1.8vw, 20px); font-weight: 600; border-bottom: 1px solid var(--ui-primary); display: inline-block; margin: 0 auto; padding-bottom: 4px; }
.cf-sample__text { font-size: 10.5px; line-height: 1.45; color: var(--ui-ink-2); max-width: 32ch; margin: 6px auto 0; }
.cf-sample__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; font-size: 9.5px; color: var(--ui-muted); text-align: left; }
.cf-sample__qr { width: 40px; height: 40px; border: 1px solid var(--ui-line-strong); border-radius: 4px; display: grid; place-items: center; color: var(--ui-ink-2); }
.cf-sample__qr .ui-icon { width: 28px; height: 28px; }

/* Три карточки «что это» */
.cf-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ui-s4); }
.cf-facts .ui-card__body { display: grid; gap: 8px; }
.cf-facts__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--ui-primary-tint); color: var(--ui-primary); display: grid; place-items: center; }
.cf-facts h3 { margin: 0; font-size: var(--ui-fs-h3); }
.cf-facts p { margin: 0; color: var(--ui-ink-2); font-size: 15px; line-height: 1.5; }

/* За что выдаётся */
.cf-programs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ui-s4); }
.cf-program { display: grid; gap: 8px; align-content: start; }
.cf-program__kicker { font-size: var(--ui-fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ui-muted); }
.cf-program h3 { margin: 0; font-size: var(--ui-fs-h3); }
.cf-program p { margin: 0; color: var(--ui-ink-2); font-size: 15px; line-height: 1.5; }
.cf-program ul { margin: 0; padding-left: 18px; color: var(--ui-ink-2); font-size: 14.5px; line-height: 1.5; }
.cf-program .ui-btn { justify-self: start; margin-top: 4px; }

/* Как получить — шаги */
.cf-steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ui-s3); margin: 0; padding: 0; list-style: none; }
.cf-steps li { position: relative; display: grid; gap: 6px; align-content: start; padding: 18px 16px 16px; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-lg); }
.cf-steps li::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--ui-primary); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.cf-steps strong { font-size: 15px; font-weight: 600; line-height: 1.3; }
.cf-steps span { font-size: var(--ui-fs-sm); color: var(--ui-muted); line-height: 1.4; }

/* Заявка: форма слева, прогресс и «что дальше» справа */
.cf-request { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: var(--ui-s6); align-items: start; }
.cf-request__aside { display: grid; gap: var(--ui-s4); }
.cf-honeypot { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-choices { display: grid; gap: 8px; }
.cf-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: var(--ui-surface); cursor: pointer; }
.cf-choice:hover { border-color: var(--ui-line-strong); }
.cf-choice input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--ui-primary); }
.cf-choice:has(input:checked) { border-color: var(--ui-primary); background: var(--ui-primary-tint); }
.cf-choice:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--ui-focus); }
.cf-choice__title { font-weight: 600; line-height: 1.3; }
.cf-choice__hint { grid-column: 2; font-size: var(--ui-fs-sm); color: var(--ui-muted); line-height: 1.4; }
.cf-choice--locked { background: var(--ui-surface-2); }
.cf-choice__badge { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.cf-choice__badge .ui-badge { white-space: normal; }
.cf-consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: var(--ui-fs-sm); line-height: 1.45; cursor: pointer; }
.cf-consent input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--ui-primary); }

/* Прогресс по 6 урокам */
.cf-progress { display: grid; gap: 10px; }
.cf-progress__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-weight: 600; }
.cf-progress__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.cf-progress__item { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 0; border-bottom: 1px solid var(--ui-line); font-size: 14.5px; }
.cf-progress__item:last-child { border-bottom: 0; }
.cf-progress__item .ui-icon { width: 18px; height: 18px; flex: none; color: var(--ui-line-strong); }
.cf-progress__item--passed .ui-icon { color: var(--ui-ok); }
.cf-progress__name { flex: 1; min-width: 0; }
.cf-progress__item a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.cf-progress__item a:hover { text-decoration: underline; }

/* Что подтверждает */
.cf-confirms { display: grid; gap: var(--ui-s3); max-width: 80ch; }
.cf-confirms p { margin: 0; line-height: 1.6; }
.cf-confirms p:first-child { font-size: 17px; }

/* Вопросы */
.cf-faq { display: grid; gap: var(--ui-s2); }
.cf-faq details { background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-lg); padding: 0 18px; }
.cf-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 0; font-weight: 600; }
.cf-faq summary::-webkit-details-marker { display: none; }
.cf-faq summary .ui-icon { flex: none; color: var(--ui-muted); transition: transform .15s ease; }
.cf-faq details[open] summary .ui-icon { transform: rotate(180deg); }
.cf-faq p { margin: 0; padding: 0 0 16px; color: var(--ui-ink-2); }

/* Страница проверки */
.cf-verify { display: grid; gap: var(--ui-s5); }
.cf-verify__head { display: grid; gap: var(--ui-s2); }
.cf-verify__status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cf-verify__lessons { margin: 0; padding-left: 20px; color: var(--ui-ink-2); line-height: 1.6; }
.cf-verify__actions { display: flex; flex-wrap: wrap; gap: var(--ui-s2); }
.cf-prose { max-width: 70ch; }
.cf-prose h2 { font-size: var(--ui-fs-h2); margin: 0 0 var(--ui-s3); }
.cf-prose p { margin: 0 0 var(--ui-s3); line-height: 1.6; color: var(--ui-ink-2); }
.cf-prose p:last-child { margin-bottom: 0; }

@media (max-width: 1100px) {
  .cf-facts, .cf-programs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cf-hero { grid-template-columns: 1fr; gap: var(--ui-s6); }
  .cf-sample { max-width: 360px; }
  .cf-request { grid-template-columns: 1fr; }
  .cf-steps { grid-template-columns: 1fr; }
  .cf-page > * + * { margin-top: var(--ui-s8); }
}
@media (max-width: 700px) {
  .cf-facts, .cf-programs { grid-template-columns: 1fr; }
  .cf-page .ui-section__title { font-size: 22px; }
  .cf-hero__actions .ui-btn { flex: 1 1 auto; }
  .cf-sample { padding: 7%; max-height: none; }
}
