/* Обучение на основном сайте: /training/. Перенесено из лаборатории prototypes/training-page,
   вариант B «Окошки» (решение пользователя 10.10.2026), доведено для телефона.
   Курсы собраны из плиток, как на странице поддержки. Тексты — content/training-page-copy.md.
   Шрифты, токены, шапка, .btn, .wrap, окно .modal и футер — из /shop/base.css. */
:root { --paper: #fbfbfc; }
[hidden] { display: none !important; }
ol { margin: 0; padding: 0; list-style: none; }

.tp { padding-top: 144px; }
.tp h1, .tp h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: -.01em; }
/* «стоматологической» — самое длинное слово: размер подобран, чтобы оно влезало в строку */
.tp h1 { font-size: min(84px, calc((100vw - 96px) / 14)); line-height: .98; }
.tp h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.04; }
.price { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.lead { max-width: 36ch; font-size: 20px; line-height: 1.5; }
.k { font-size: 14px; font-weight: 500; line-height: 20px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* «Входит в практический курс» — красная галочка, как в блоке 8 главной */
.inc { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; line-height: 24px; }
.inc svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.policy { display: inline-block; margin-top: 24px; font-size: 14px; line-height: 20px; color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.policy:hover { color: var(--ink); }

/* стрелка в кружке: уходит вправо, новая приходит слева (как на поддержке) */
.arr { position: relative; flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: var(--surface); color: var(--ink); transition: background 150ms var(--ease), color 150ms var(--ease); }
.arr svg { position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 250ms var(--ease); }
.arr svg + svg { transform: translateX(-56px); }
.hov:hover .arr svg:first-child { transform: translateX(56px); }
.hov:hover .arr svg + svg { transform: none; }
.stretch::before { content: ""; position: absolute; inset: 0; z-index: 0; }
.stretch:focus-visible { outline: none; }
.hov:has(.stretch:focus-visible) { outline: 2px solid var(--red); outline-offset: 4px; }
button.stretch { padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }

/* ---------- плитки ---------- */
.tr-sec { padding-top: 96px; }
.tr-sec.is-first { padding-top: 48px; }
#online { scroll-margin-top: 96px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.card { position: relative; min-width: 0; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.card > .k { display: block; margin-bottom: 16px; }

/* название курса, цена, вводная, кнопка */
.c-title, .c-on { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding: 40px; }
.c-title { grid-column: 1 / 8; }
.c-title h2, .c-on h2 { font-size: clamp(28px, 3.4vw, 44px); }
.c-title .price, .c-on .price { font-size: clamp(48px, 6vw, 80px); line-height: 1; }
.c-title .lead { margin-bottom: 8px; }
.c-title .btn { margin-top: auto; }

/* видео клиента */
.c-video { grid-column: 8 / 13; padding: 0; overflow: hidden; border: 0; }
.c-video .tr-vid { height: 100%; aspect-ratio: auto; min-height: 320px; }

/* программа — пронумерованные строки */
.c-prog { grid-column: 1 / 9; }
.prog { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; counter-reset: p; }
.prog li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 18px; line-height: 1.45; }
.prog li::before { counter-increment: p; content: counter(p, decimal-leading-zero); padding-top: 2px; font-size: 14px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; transition: color 150ms var(--ease); }
.prog li:hover::before { color: var(--red); }

/* результат — на чёрном */
.c-res { grid-column: 9 / 13; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; border-color: var(--night); background: var(--night); color: var(--night-ink); }
.c-res .k { color: var(--night-muted); }
.c-res p { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: 125%; font-size: 24px; line-height: 1.2; }

/* условия — пять плиток одного устройства: окошко сверху, подпись снизу */
.terms { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.t { display: flex; flex-direction: column; gap: 16px; padding: 12px 12px 20px; }
.t b { padding: 0 8px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.peek { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: var(--bg); }
.peek img { width: 100%; height: 100%; object-fit: cover; transition: transform 250ms var(--ease); }
.t:hover .peek img { transform: scale(1.04); }
.peek svg { display: block; }
/* «Один день»: красная точка проходит дугу дня, когда плитка на экране */
.sun { width: 72%; height: auto; overflow: visible; }
.sun .sky { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 5; stroke-linecap: round; }
.sun .gone { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1600ms var(--ease); }
.sun .land { stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; }
.sun .dot { fill: var(--red); transform-box: view-box; transform-origin: 80px 80px; transition: transform 1600ms var(--ease); }
.on .sun .gone { stroke-dashoffset: 0; }
.on .sun .dot { transform: rotate(180deg); }
/* «До двух участников»: два места */
.seats { display: flex; gap: 16px; }
.seats svg { width: 56px; height: 56px; fill: none; stroke: var(--ink); stroke-width: 2; transition: fill 250ms var(--ease), stroke 250ms var(--ease); }
.seats svg:first-child { fill: var(--ink); }
.t:hover .seats svg:last-child { fill: var(--red); stroke: var(--red); }
/* «Онлайн-курс в подарок» — красная плитка со знаком онлайн-курса, ведёт к нему */
.t-gift { border-color: var(--red); background: var(--red); color: #fff; transition: background 150ms var(--ease), border-color 150ms var(--ease); }
.t-gift:hover { border-color: var(--red-hover); background: var(--red-hover); }
.t-gift .peek { background: rgb(255 255 255 / .12); }
.t-gift .inf { width: 60%; height: auto; fill: none; stroke: rgb(255 255 255 / .5); stroke-width: 3; stroke-linecap: round; }
.t-gift .inf .run { stroke: #fff; stroke-dasharray: 18 182; animation: run 3s linear infinite; }
.t-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-left: 8px; }
.t-foot b { flex: 1 1 auto; min-width: 0; padding: 0; }
.t-gift .arr { width: 44px; height: 44px; background: rgb(255 255 255 / .16); color: #fff; }
.t-gift .arr svg { transform: rotate(90deg); }
.t-gift .arr svg + svg { transform: rotate(90deg) translateX(-56px); }
.t-gift.hov:hover .arr { background: #fff; color: var(--red); }
.t-gift.hov:hover .arr svg:first-child { transform: rotate(90deg) translateX(56px); }
.t-gift.hov:hover .arr svg + svg { transform: rotate(90deg); }
.t-gift :focus-visible { outline-color: #fff; }

/* онлайн-курс */
.c-on { grid-column: 1 / 6; grid-row: 1; }
.c-on-prog { grid-column: 6 / 13; grid-row: 1 / 3; }
.c-on-prog .prog { grid-template-columns: 1fr; }
.c-on-prog .prog li { padding: 20px 0; font-size: 20px; }
.c-forever { grid-column: 1 / 6; grid-row: 2; display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 24px; }
.c-forever svg { width: 96px; height: 48px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.c-forever .run { stroke: var(--red); stroke-dasharray: 18 182; animation: run 3s linear infinite; }
@keyframes run { to { stroke-dashoffset: -200; } }
.c-forever p { font-size: 18px; line-height: 1.5; }

/* запись — две равные чёрные плитки, при наведении краснеют */
.tr-final { padding-top: 96px; padding-bottom: 128px; } /* по бокам — отступы .wrap */
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.go { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: 240px; padding: 32px; border-color: var(--night); background: var(--night); color: var(--night-ink); transition: background 150ms var(--ease), border-color 150ms var(--ease); }
.go:hover { border-color: var(--red); background: var(--red); }
.go .k { color: var(--night-muted); transition: color 150ms var(--ease); }
.go:hover .k { color: rgb(255 255 255 / .8); }
.go-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.go-t { flex: 1 1 auto; min-width: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: 125%; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.15; }
.go .arr { background: rgb(255 255 255 / .1); color: #fff; }
.go.hov:hover .arr { background: #fff; color: var(--red); }
.go :focus-visible { outline-color: #fff; }

@media (max-width: 1099px) {
  .c-title, .c-video, .c-prog, .c-res { grid-column: 1 / -1; }
  .c-video .tr-vid { aspect-ratio: 16 / 9; height: auto; min-height: 0; }
  .terms { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* красная плитка на две колонки — в строку: знак, подпись, стрелка */
  .t-gift { grid-column: span 2; flex-direction: row; align-items: center; padding: 12px 20px 12px 12px; }
  .t-gift .peek { flex: none; width: min(40%, 200px); }
  .t-gift .t-foot { flex: 1 1 auto; align-items: center; }
  .c-on, .c-forever, .c-on-prog { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 767px) {
  .tp { padding-top: 120px; }
  .tp h1 { font-size: calc((100vw - 32px) / 12.6); }
  .lead { font-size: 18px; }
  .tr-sec { padding-top: 64px; }
  .tr-sec.is-first { padding-top: 32px; }
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 24px 20px; }
  .c-title, .c-on { padding: 24px 20px; gap: 16px; }
  .c-video { padding: 0; }
  .prog { grid-template-columns: 1fr; }
  .prog li, .c-on-prog .prog li { padding: 16px 0; font-size: 18px; }
  .c-res { gap: 24px; }
  .c-res p { font-size: 20px; }
  .terms { grid-template-columns: 1fr 1fr; gap: 12px; }
  .t { gap: 12px; padding: 8px 8px 16px; }
  .t b { font-size: 16px; }
  .peek { border-radius: 8px; }
  .seats svg { width: 44px; height: 44px; }
  .t-gift { grid-column: 1 / -1; padding: 8px 16px 8px 8px; }
  .t-gift .peek { width: 112px; }
  .c-forever { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
  .c-forever svg { width: 64px; height: 32px; }
  .c-forever p { font-size: 16px; }
  .tr-final { padding-top: 64px; padding-bottom: 96px; }
  .pick { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .go { min-height: 0; padding: 24px 20px; gap: 32px; }
  .go .arr { width: 48px; height: 48px; }
}

/* ---------- окно записи (enroll.js) ---------- */
.en { width: min(600px, calc(100% - 32px)); }
.en .m-title { font-size: 24px; }
.en-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
.en-opt { position: relative; display: grid; cursor: pointer; } /* обе карточки курса — одной высоты */
.en-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.en-face { display: grid; gap: 4px; min-height: 88px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.en-face b { font-size: 16px; font-weight: 600; line-height: 22px; }
.en-face small { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: 125%; font-size: 20px; line-height: 1.2; transition: color 150ms var(--ease); }
.en-opt:hover .en-face { border-color: var(--muted); }
.en-opt input:checked + .en-face { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.en-opt input:checked + .en-face small { color: var(--red); }
.en-opt input:focus-visible + .en-face { outline: 2px solid var(--red); outline-offset: 2px; }
.en .m-fields { grid-template-columns: 1fr 1fr; column-gap: 24px; }
.en .m-consent a:hover { color: var(--red); }
@media (max-width: 520px) {
  .en .m-fields { grid-template-columns: 1fr; }
  .en-pick { gap: 8px; }
  .en-face { min-height: 0; padding: 12px; }
  .en-face small { font-size: 18px; }
}

/* ---------- видео клиента: в плитке и во весь экран — как блок 8 главной ---------- */
.tr-vid { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; cursor: pointer; isolation: isolate; background: var(--surface); -webkit-tap-highlight-color: transparent; }
.tr-vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tr-vid:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.tr-ctl { position: absolute; z-index: 3; right: 16px; bottom: 16px; display: flex; gap: 8px; cursor: auto; }
.tr-btn { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 2px 12px rgb(0 0 0 / .28); cursor: pointer; transition: transform 200ms var(--ease); }
.tr-btn:hover { transform: scale(1.06); }
.tr-btn:active { transform: scale(.96); }
.tr-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.tr-btn svg { width: 20px; height: 20px; display: block; }
.tr-btn .i-off, .tr-pp .i-play { display: none; }
.tr-btn[aria-pressed="true"] .i-on { display: none; }
.tr-btn[aria-pressed="true"] .i-off { display: block; }
.tr-pp[aria-pressed="true"] .i-play { display: block; }
.tr-pp[aria-pressed="true"] .i-pause { display: none; }
.tr-cc { font: 700 14px/1 var(--font-body); letter-spacing: .02em; }
.tr-cc[aria-pressed="false"] { background: rgb(255 255 255 / .28); color: #fff; }
.tr-subs { position: absolute; z-index: 2; left: 16px; right: 120px; bottom: 16px; min-height: 44px; display: flex; align-items: flex-end; justify-content: flex-start; pointer-events: none; }
.tr-subs span { padding: 4px 10px; border-radius: 8px; background: rgb(10 10 10 / .72); box-decoration-break: clone; -webkit-box-decoration-break: clone; color: #fff; font-size: 16px; line-height: 26px; font-weight: 500; }
.tr-subs:empty, .tr-subs.off { display: none; }
@media (max-width: 767px) {
  .tr-subs { left: 12px; right: 12px; bottom: 68px; min-height: 0; justify-content: center; text-align: center; }
  .tr-subs span { padding: 3px 8px; font-size: 14px; line-height: 21px; }
  .tr-ctl { right: 12px; bottom: 12px; }
}
.tr-pop { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.tr-pop::backdrop { background: rgb(10 10 10 / .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tr-pop[open] { display: grid; place-items: center; animation: tr-pop-in 250ms var(--ease); }
@keyframes tr-pop-in { from { opacity: 0; } }
.tr-frame { position: relative; width: min(94vw, 1280px, calc((100dvh - 48px) * 16 / 9)); }
.tr-full { cursor: default; border-radius: 16px; box-shadow: 0 24px 80px rgb(0 0 0 / .5); }
.tr-full video { object-fit: contain; }
.tr-full .tr-subs { left: 16px; right: 16px; bottom: 100px; min-height: 0; justify-content: center; text-align: center; }
.tr-close { position: absolute; z-index: 5; top: -56px; right: 0; }
.tr-seek { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 76px; height: 20px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.tr-seek i { display: block; position: relative; width: 100%; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .3); }
.tr-seek b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: #fff; }
@media (min-width: 1000px) { .tr-full .tr-subs span { font-size: 20px; line-height: 32px; } }
.tr-cur { position: fixed; left: 0; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 4px 16px rgb(0 0 0 / .18); font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; pointer-events: none; opacity: 0; scale: .8; transition: opacity 150ms var(--ease), scale 150ms var(--ease); will-change: transform; }
.tr-cur svg { width: 14px; height: 14px; color: var(--red); }
.tr-cur.show { opacity: 1; scale: 1; }
.tr-vid.has-cur { cursor: none; }

@media (prefers-reduced-motion: reduce) {
  .c-forever .run, .t-gift .inf .run { animation: none; }
}

/* Телефон: шкала шрифтов по эталонным сайтам (Stripe, Linear, Vercel: H1 24–38, H2 22–34, текст 15–16) — 18.10.2026 */
@media (max-width: 767px) {
  .tp h2 { font-size: 26px; }
  .c-title h2, .c-on h2 { font-size: 24px; }
  .c-title .price, .c-on .price { font-size: 40px; }
}
