/*
 * Motion system v8.
 * Движение объясняет иерархию интерфейса, поддерживает ощущение живого
 * продукта и не влияет на компоновку страницы.
 */

:root {
  --motion-ease-out: cubic-bezier(.16, 1, .3, 1);
  --motion-ease-spring: cubic-bezier(.2, 1.35, .35, 1);
}

@property --phone-breathe {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

/* Тонкая линия показывает положение внутри длинной продуктовой истории. */
.public-motion-progress {
  background: linear-gradient(90deg, var(--brand-electric), var(--brand-ice) 68%, var(--brand-coral));
  box-shadow: 0 0 18px rgba(120, 231, 255, .45);
  height: 3px;
  left: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  scale: var(--motion-scroll, 0) 1;
  transform-origin: 0 50%;
  top: 0;
  z-index: 90;
}

/* Первый экран входит слоями и сразу показывает глубину устройств. */
.product-kicker,
.product-hero h1,
.product-hero-copy > p,
.product-hero-actions,
.product-hero-meta,
.product-device-stage {
  opacity: 0;
  translate: 0 24px;
}

.is-ready .product-kicker { animation: motion-rise .7s .08s var(--motion-ease-out) forwards; }
.is-ready .product-hero h1 { animation: motion-title-in 1s .15s var(--motion-ease-out) forwards; }
.is-ready .product-hero-copy > p { animation: motion-rise .85s .34s var(--motion-ease-out) forwards; }
.is-ready .product-hero-actions { animation: motion-rise .85s .45s var(--motion-ease-out) forwards; }
.is-ready .product-hero-meta { animation: motion-rise .85s .56s var(--motion-ease-out) forwards; }
.is-ready .product-device-stage { animation: motion-device-in 1.15s .22s var(--motion-ease-out) forwards; }

.product-device-stage::before,
.product-device-stage::after {
  border: 1px solid rgba(91, 77, 242, .15);
  border-radius: 50%;
  content: "";
  height: min(34vw, 520px);
  pointer-events: none;
  position: absolute;
  right: -8%;
  top: 8%;
  width: min(34vw, 520px);
  z-index: -1;
}

.product-device-stage::after {
  border-color: rgba(120, 231, 255, .2);
  height: min(27vw, 410px);
  right: -1%;
  top: 16%;
  width: min(27vw, 410px);
}

.is-ready .product-device-stage::before { animation: motion-orbit 18s linear infinite; }
.is-ready .product-device-stage::after { animation: motion-orbit 13s linear infinite reverse; }

.product-phone { translate: 0 var(--phone-breathe, 0); }
.is-ready .product-phone { animation: motion-phone-breathe 4.8s 1.3s ease-in-out infinite; }
.product-phone:hover,
.product-phone:focus-within { animation-play-state: paused; }

.product-demo {
  box-shadow:
    0 calc(45px + var(--hero-depth, 0px)) calc(100px + var(--hero-depth, 0px)) rgba(17, 22, 47, .27),
    0 0 0 1px rgba(120, 231, 255, .05);
}

.product-demo > header i,
.interface-chrome > div i,
.form-appbar > div i { animation: motion-status-dot 4.2s ease-in-out infinite; }
.product-demo > header i:nth-child(2),
.interface-chrome > div i:nth-child(2),
.form-appbar > div i:nth-child(2) { animation-delay: -.9s; }
.product-demo > header i:nth-child(3),
.interface-chrome > div i:nth-child(3),
.form-appbar > div i:nth-child(3) { animation-delay: -1.8s; }

/* Reveal получил глубину, но остаётся коротким и читаемым. */
.cinematic-reveal {
  filter: blur(3px);
  opacity: .62;
  transform: translateY(30px) scale(.99);
  transition:
    filter .48s calc(var(--reveal-order, 0) * .045s) ease,
    opacity .48s calc(var(--reveal-order, 0) * .045s) ease,
    transform .72s calc(var(--reveal-order, 0) * .045s) var(--motion-ease-out);
}
.cinematic-reveal.is-visible { filter: none; opacity: 1; transform: none; }

/* Карточки реагируют на курсор светом и небольшой инерцией. */
.motion-surface {
  --motion-rx: 0deg;
  --motion-ry: 0deg;
  isolation: isolate;
  transform-style: preserve-3d;
  will-change: transform;
}

.motion-surface::before {
  background: radial-gradient(
    340px circle at var(--motion-x, 50%) var(--motion-y, 50%),
    rgba(255, 255, 255, .24),
    transparent 64%
  );
  border-radius: inherit;
  content: "" !important;
  display: block !important;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity .35s ease;
  z-index: 12;
}

.motion-surface.is-motion-pointed {
  transform: perspective(1200px) rotateX(var(--motion-rx)) rotateY(var(--motion-ry)) translateY(-5px);
}
.motion-surface.is-motion-pointed::before { opacity: 1; }

.product-bento > article,
.subject-browser .subject-card,
.catalog-window .program-deck .program-tile,
.mentor-console .public-teacher-card,
.mentor-console .teacher-quote {
  transition:
    border-color .3s ease,
    box-shadow .35s ease,
    transform .45s var(--motion-ease-out);
}

/* Преимущества ощущаются как работающие мини-модули. */
.bento-topic-stack span { animation: motion-topic-float 5s ease-in-out infinite; }
.bento-topic-stack span:nth-child(2) { animation-delay: -.9s; }
.bento-topic-stack span:nth-child(3) { animation-delay: -1.8s; }
.bento-visibility i { transition: background .25s ease, color .25s ease, scale .3s var(--motion-ease-spring); }
.bento-visibility i:hover { background: var(--brand-night); color: #fff; scale: 1.07; }

.progress-ring::before {
  background: var(--brand-coral);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 5px 18px rgba(17, 22, 47, .2);
  content: "";
  height: 12px;
  left: 50%;
  position: absolute;
  top: -7px;
  transform-origin: 0 calc(72px + 7px);
  width: 12px;
  z-index: 2;
}
.is-visible .progress-ring::before { animation: motion-progress-orbit 8s linear infinite; }
.bento-rhythm li { transition: background .25s ease, padding .35s var(--motion-ease-out); }
.bento-rhythm li:hover { background: rgba(120, 231, 255, .08); padding-inline: 8px; }
.bento-rhythm li:last-child i { animation: motion-soft-pulse 2.3s ease-in-out infinite; }

/* Предметы и программы раскрывают графику при наведении. */
.subject-card-stage > b {
  transition: color .3s ease, scale .55s var(--motion-ease-spring), transform .55s var(--motion-ease-out);
}
.subject-card:hover .subject-card-stage > b { scale: 1.08; transform: rotate(-3deg); }
.subject-card-stage > span { animation: motion-soft-pulse 3.2s ease-in-out infinite; }
.subject-card > footer i,
.program-tile-footer > a span,
.public-footer-cta b,
.product-primary span {
  transition: rotate .35s var(--motion-ease-spring), scale .35s var(--motion-ease-spring);
}
.subject-card:hover > footer i,
.program-tile:hover .program-tile-footer > a span,
.public-footer-cta:hover b,
.product-primary:hover > span { rotate: 8deg; scale: 1.08; }

.program-tile-stage { perspective: 900px; }
.program-tile-photo { scale: 1.01; }
.program-tile:hover .program-tile-photo { scale: 1.065; }
.program-math-board > strong { animation: motion-equation 4.8s ease-in-out infinite; }
.program-code-board code::after {
  animation: motion-caret .9s steps(1) infinite;
  background: var(--brand-ice);
  content: "";
  display: inline-block;
  height: 1.1em;
  margin-left: 5px;
  vertical-align: -.18em;
  width: 2px;
}

/* Живой урок включается только после появления экрана в viewport. */
.session-focus::before {
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .18) 48%, transparent 64%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  translate: -120% 0;
  z-index: 1;
}
.interface-session.is-motion-active .session-focus::before { animation: motion-shine 5.8s 1s ease-in-out infinite; }
.interface-session.is-motion-active .session-focus::after { animation: motion-focus-orb 5s ease-in-out infinite; }
.session-board > div > span i { transform-origin: 50% 100%; }
.interface-session.is-motion-active .session-board > div > span i { animation: motion-board-wave 1.1s ease-in-out infinite alternate; }
.interface-session.is-motion-active .session-board > div > span i:nth-child(2) { animation-delay: -.7s; }
.interface-session.is-motion-active .session-board > div > span i:nth-child(3) { animation-delay: -.35s; }
.interface-session.is-motion-active .session-board > div > span i:nth-child(4) { animation-delay: -.85s; }
.interface-session.is-motion-active .session-board > div > span i:nth-child(5) { animation-delay: -.15s; }

/* Портрет и сообщение реагируют по-разному, но остаются одной сценой. */
.teacher-portrait img { scale: 1.015; }
.public-teacher-card:hover .teacher-portrait img { scale: 1.075; transform: translate3d(0, -1.5%, 0); }
.mentor-console .teacher-quote > span { animation: motion-quote-float 4.6s ease-in-out infinite; }
.mentor-console .teacher-quote > div i { animation: motion-tick 2.5s ease-in-out infinite; }
.mentor-console .teacher-quote > div i:nth-child(2) { animation-delay: .18s; }

/* Форма показывает фокус и путь без декоративной суеты. */
.request-copy::before {
  background:
    radial-gradient(circle, rgba(120, 231, 255, .75) 0 11%, transparent 11.5%),
    radial-gradient(circle, rgba(255, 95, 122, .76) 0 7%, transparent 7.5%);
  background-position: 68% 78%, 82% 63%;
  background-repeat: no-repeat;
  background-size: 260px 260px, 180px 180px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.interface-onboarding.is-motion-active .request-copy::before { animation: motion-onboarding-orbs 8s ease-in-out infinite alternate; }
.onboarding-steps span { overflow: hidden; position: relative; transition: color .25s ease, translate .3s var(--motion-ease-out); }
.onboarding-steps span::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .24), transparent);
  content: "";
  inset: 0;
  position: absolute;
  translate: -120% 0;
}
.interface-onboarding.is-motion-active .onboarding-steps span::after { animation: motion-step-scan 5.4s ease-in-out infinite; }
.interface-onboarding.is-motion-active .onboarding-steps span:nth-child(2)::after { animation-delay: .4s; }
.interface-onboarding.is-motion-active .onboarding-steps span:nth-child(3)::after { animation-delay: .8s; }
.onboarding-steps span:hover { translate: 5px 0; }

.public-field {
  border-radius: 12px;
  transition: background .25s ease, box-shadow .25s ease, translate .3s var(--motion-ease-out);
}
.public-field:focus-within { translate: 0 -2px; }
.public-field:focus-within > span { color: var(--brand-electric); }
.public-field .form-control { transition: background .25s ease, border-color .25s ease, box-shadow .25s ease; }

/* Магнитная реакция применяется только к компактным действиям. */
.motion-magnetic {
  translate: var(--magnet-x, 0px) var(--magnet-y, 0px);
  transition: translate .45s var(--motion-ease-spring), box-shadow .3s ease;
  will-change: translate;
}
.motion-magnetic:hover { box-shadow: 0 12px 30px rgba(17, 22, 47, .15); }

.public-footer-statement { translate: 0 calc((var(--section-progress, .5) - .5) * -20px); }

@keyframes motion-rise {
  to { opacity: 1; translate: 0 0; }
}
@keyframes motion-title-in {
  from { filter: blur(12px); opacity: 0; translate: 0 38px; }
  to { filter: none; opacity: 1; translate: 0 0; }
}
@keyframes motion-device-in {
  from { filter: blur(12px); opacity: 0; translate: 70px 30px; }
  to { filter: none; opacity: 1; translate: 0 0; }
}
@keyframes motion-orbit {
  50% { scale: 1.045; translate: -12px 8px; }
  to { rotate: 360deg; }
}
@keyframes motion-phone-breathe {
  0%, 100% { --phone-breathe: 0px; }
  50% { --phone-breathe: -9px; }
}
@keyframes motion-status-dot {
  0%, 74%, 100% { filter: brightness(1); scale: 1; }
  82% { filter: brightness(1.25); scale: 1.28; }
}
@keyframes motion-topic-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 5px -5px; }
}
@keyframes motion-progress-orbit { to { rotate: 360deg; } }
@keyframes motion-soft-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 95, 122, 0); }
  50% { box-shadow: 0 0 0 5px rgba(255, 95, 122, .08); }
}
@keyframes motion-equation {
  0%, 100% { letter-spacing: -.06em; translate: 0 0; }
  50% { letter-spacing: -.02em; translate: 4px 0; }
}
@keyframes motion-caret { 50% { opacity: 0; } }
@keyframes motion-shine {
  0%, 55% { translate: -120% 0; }
  82%, 100% { translate: 120% 0; }
}
@keyframes motion-focus-orb {
  50% { scale: 1.08; translate: -10px 9px; }
}
@keyframes motion-board-wave {
  from { scale: 1 .35; }
  to { scale: 1 1.12; }
}
@keyframes motion-quote-float {
  50% { rotate: -6deg; translate: 4px -7px; }
}
@keyframes motion-tick {
  0%, 70%, 100% { opacity: .45; scale: .9; }
  80% { opacity: 1; scale: 1.15; }
}
@keyframes motion-onboarding-orbs {
  to { background-position: 72% 73%, 78% 67%; rotate: 1deg; }
}
@keyframes motion-step-scan {
  0%, 60% { translate: -120% 0; }
  88%, 100% { translate: 120% 0; }
}

@media (max-width: 900px) {
  .motion-surface.is-motion-pointed { transform: translateY(-3px); }
  .product-device-stage::before,
  .product-device-stage::after { opacity: .55; }
}

@media (max-width: 760px) {
  .public-motion-progress { height: 2px; }
  .is-ready .product-kicker,
  .is-ready .product-hero h1,
  .is-ready .product-hero-copy > p,
  .is-ready .product-hero-actions,
  .is-ready .product-hero-meta,
  .is-ready .product-device-stage {
    animation: motion-rise .58s var(--mobile-motion-delay, .04s) var(--motion-ease-out) forwards;
  }
  .is-ready .product-hero h1 { --mobile-motion-delay: .08s; }
  .is-ready .product-hero-copy > p { --mobile-motion-delay: .14s; }
  .is-ready .product-hero-actions { --mobile-motion-delay: .2s; }
  .is-ready .product-hero-meta { --mobile-motion-delay: .26s; }
  .is-ready .product-device-stage { --mobile-motion-delay: .18s; }
  .product-device-stage::before,
  .product-device-stage::after { display: none; }
  .product-phone { animation: none !important; }
  .motion-surface { transform-style: flat; will-change: auto; }
  .motion-surface::before { display: none; }
  .bento-topic-stack span { animation-duration: 7s; }
  .public-footer-statement { translate: none; }
}

@media (prefers-reduced-motion: reduce) {
  .public-motion-progress { display: none; }
  .product-kicker,
  .product-hero h1,
  .product-hero-copy > p,
  .product-hero-actions,
  .product-hero-meta,
  .product-device-stage { filter: none; opacity: 1; translate: none; }
  .cinematic-reveal { filter: none; opacity: 1; transform: none; }
  .motion-surface,
  .motion-surface.is-motion-pointed { transform: none; }
  .motion-magnetic { translate: none; }
  .public-footer-statement { translate: none; }
}

/* =========================================================================
   Round 3 · финальная полировка публичного сайта.
   Единая шкала заголовков, гуттеры, мобильное меню, футер, страница тарифов.
   ========================================================================= */
:root { --r3-night: #11162f; --r3-indigo: #5b4df2; --r3-indigo-dark: #3d31bd; --r3-lime: #dafe62; --r3-ice: #78e7ff; --r3-ink: #151a31; --r3-muted: #5d6580; --r3-line: #dce1ee; --r3-paper: #fff; --r3-cloud: #f3f5fb; }

/* --- Шкала заголовков ---------------------------------------------------- */
html body.public-page main .product-hero-copy h1 { font-size: clamp(40px, 6.4vw, 92px); line-height: .98; }
html body.public-page main :is(.public-inner-hero, .subject-profile-hero, .course-detail-hero, .teacher-profile-copy, .contact-copy, .public-thanks) h1 { font-size: clamp(36px, 5.2vw, 76px); line-height: 1.02; }
html body.public-page main .public-legal h1 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.05; }
html body.public-page main :is(.public-section-head h2, .product-proof > header h2, .method-copy h2, .request-copy h2, .public-section > div > h2) { font-size: clamp(30px, 3.8vw, 56px); line-height: 1.04; }
html body.public-page .public-footer-statement h2 { font-size: clamp(28px, 3.2vw, 46px); line-height: 1.06; }
html body.public-page main :is(h1, h2) { text-wrap: balance; }

/* --- Герой главной: текст не уходит под макет телефона ----------------- */
html body.public-page .product-hero-copy { position: relative; z-index: 3; }
html body.public-page .product-hero-copy > p { max-width: 480px; }

/* --- Репетиторы на главной: цитата не растягивается в пустую колонну ---- */
html body.public-page .teacher-showcase > .teacher-quote { align-self: start; }
@media (min-width: 901px) { html body.public-page .teacher-showcase > .teacher-quote { position: sticky; top: 104px; } }

/* --- Шапка и меню -------------------------------------------------------- */
html body.public-page .public-header-cta:focus-visible,
html body.public-page .public-nav > a:focus-visible,
html body.public-page .public-menu:focus-visible,
html body.public-page .public-brand:focus-visible { outline: 3px solid var(--r3-indigo); outline-offset: 3px; }
.public-menu-icon { display: grid; gap: 4px; width: 18px; }
.public-menu-icon i { background: currentColor; border-radius: 2px; display: block; height: 2px; transition: transform .2s ease, opacity .2s ease; }
.public-menu[aria-expanded="true"] .public-menu-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.public-menu[aria-expanded="true"] .public-menu-icon i:nth-child(2) { opacity: 0; }
.public-menu[aria-expanded="true"] .public-menu-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (min-width: 761px) { html body.public-page .public-nav-actions { display: none; } }

/* --- Футер --------------------------------------------------------------- */
html body.public-page .public-footer-cta { background: var(--r3-lime); color: var(--r3-night); }
html body.public-page .public-footer-cta span { color: var(--r3-night); }
html body.public-page .public-footer-cta b { background: var(--r3-night); color: var(--r3-lime); }
html body.public-page .public-footer-cta:hover { background: #e9ff9c; }
html body.public-page .public-footer-cta:focus-visible { outline: 3px solid var(--r3-ice); outline-offset: 3px; }
html body.public-page .public-footer-grid a { min-height: 32px; display: inline-flex; align-items: center; }

/* --- Телефон -------------------------------------------------------------- */
@media (max-width: 760px) {
  html body.public-page .public-header { height: 64px; padding-inline: 16px; }
  html body.public-page .public-brand-mark { height: 40px; width: 40px; }
  html body.public-page .public-brand-type strong { font-size: 20px; }
  html body.public-page .public-brand-type em { display: none; }
  html body.public-page .public-header-cta { display: none; }
  html body.public-page .public-menu { align-items: center; background: var(--r3-night); border: 0; border-radius: 12px; color: #fff; cursor: pointer; display: flex; height: 44px; justify-content: center; margin-left: auto; width: 44px; }
  html body.public-page .public-nav {
    background: var(--r3-night);
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(17, 22, 47, .35), 0 0 0 100vmax rgba(17, 22, 47, .35);
    display: none;
    flex-direction: column;
    gap: 2px;
    left: 12px;
    max-height: calc(100dvh - 90px);
    overflow: auto;
    padding: 10px;
    position: fixed;
    right: 12px;
    top: 74px;
    transform: none;
    z-index: 80;
  }
  html body.public-page .public-nav.is-open { display: flex; }
  html body.public-page .public-nav > a { align-items: center; background: none; border: 0; border-radius: 12px; color: #fff; display: flex; font-size: 16px; font-weight: 700; min-height: 48px; padding: 0 14px; }
  html body.public-page .public-nav > a:hover, html body.public-page .public-nav > a[aria-current="page"] { background: rgba(255, 255, 255, .1); color: var(--r3-lime); }
  html body.public-page .public-nav > .public-cabinet-link { display: none; }
  html body.public-page .public-nav-actions { border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 8px; margin-top: 6px; padding: 12px 4px 4px; }
  html body.public-page .public-nav-cta { align-items: center; background: rgba(255, 255, 255, .1); border-radius: 12px; color: #fff; display: flex; font-size: 15px; font-weight: 800; justify-content: center; min-height: 48px; padding: 0 16px; text-align: center; text-decoration: none; }
  html body.public-page .public-nav-cta--accent { background: var(--r3-lime); color: var(--r3-night); }
  html body.public-page .public-nav-cta:focus-visible { outline: 3px solid var(--r3-ice); outline-offset: 2px; }
  body.public-page.is-menu-open { overflow: hidden; }

  html body.public-page main .public-section,
  html body.public-page main .product-hero { padding-left: 16px; padding-right: 16px; }
  html body.public-page main .product-hero-copy h1 { font-size: clamp(38px, 11vw, 46px); }
  html body.public-page main :is(.public-inner-hero, .subject-profile-hero, .course-detail-hero, .teacher-profile-copy, .contact-copy, .public-thanks) h1 { font-size: clamp(32px, 9.4vw, 40px); letter-spacing: -.04em; }
  html body.public-page main .public-legal h1 { font-size: 32px; }
  html body.public-page main :is(.public-section-head h2, .product-proof > header h2, .method-copy h2, .request-copy h2, .public-section > div > h2) { font-size: clamp(27px, 8vw, 32px); letter-spacing: -.035em; line-height: 1.08; }
  html body.public-page main .public-program-card h2 { font-size: 26px; }
  html body.public-page main .public-legal h2 { font-size: 22px; }
  html body.public-page .public-footer-statement h2 { font-size: 28px; }
  /* Минимальный кегль на телефоне — 12px для подписей, 14px для текста. */
  html body.public-page :is(.public-eyebrow, .public-footer-statement > span, .public-footer-grid span, .public-footer-bottom span, .course-profile-card header span, .course-profile-card header b, .public-program-card header span, .public-program-card header b, .about-teacher span, .product-kicker, .product-hero-meta span) { font-size: 12px; }
  html body.public-page :is(.public-program-card p, .course-profile-card p, .public-teacher-card p) { font-size: 14px; line-height: 1.5; }
  html body.public-page .public-footer-cta { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .public-menu-icon i { transition: none; } }

/* --- Тарифы --------------------------------------------------------------- */
.pr-page { --pr-max: 1080px; padding: clamp(32px, 6vw, 88px) clamp(16px, 4vw, 48px) clamp(40px, 6vw, 80px); }
.pr-page > * { margin-left: auto; margin-right: auto; max-width: var(--pr-max); }
.pr-hero { text-align: center; }
.pr-hero .public-eyebrow { justify-content: center; }
.pr-hero h1 { color: var(--r3-ink); font-size: clamp(34px, 5vw, 64px); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; margin: 12px auto 0; max-width: 16ch; text-wrap: balance; }
.pr-hero h1 em { color: var(--r3-indigo); display: block; font-family: Prata, Georgia, serif; font-style: normal; font-weight: 400; letter-spacing: -.02em; }
.pr-hero > p { color: var(--r3-muted); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.6; margin: 18px auto 0; max-width: 560px; }
.pr-trust { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; margin: 24px 0 0; padding: 0; }
.pr-trust li { align-items: center; background: var(--r3-paper); border: 1px solid var(--r3-line); border-radius: 999px; color: var(--r3-ink); display: inline-flex; font-size: 14px; font-weight: 700; gap: 8px; min-height: 36px; padding: 0 14px; }
.pr-trust li::before { align-items: center; background: var(--r3-lime); border-radius: 50%; color: var(--r3-night); content: "✓"; display: inline-flex; font-size: 11px; height: 18px; justify-content: center; width: 18px; }
.pr-plans { align-items: stretch; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-top: clamp(32px, 5vw, 56px); max-width: 920px !important; }
.pr-plan { background: var(--r3-paper); border: 1px solid var(--r3-line); border-radius: 28px; box-shadow: 0 24px 60px -36px rgba(17, 22, 47, .35); color: var(--r3-ink); display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 3vw, 36px); }
.pr-plan--featured { background: radial-gradient(circle at 100% 0, rgba(91, 77, 242, .55), transparent 60%), var(--r3-night); border-color: var(--r3-night); color: #fff; }
.pr-plan header p { color: var(--r3-muted); font-size: 15px; line-height: 1.5; margin: 6px 0 0; }
.pr-plan--featured header p { color: #c9cde4; }
.pr-plan-title { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.pr-plan-title h2 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.pr-badge { background: var(--r3-lime); border-radius: 999px; color: var(--r3-night); font-size: 12px; font-weight: 800; padding: 5px 12px; }
.pr-price { border-bottom: 1px solid var(--r3-line); display: grid; gap: 2px; padding-bottom: 22px; }
.pr-plan--featured .pr-price { border-color: rgba(255, 255, 255, .14); }
.pr-price strong { font-size: clamp(44px, 5vw, 56px); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.pr-price span { color: var(--r3-muted); font-size: 15px; font-weight: 600; }
.pr-price small { color: var(--r3-muted); font-size: 14px; margin-top: 6px; }
.pr-plan--featured .pr-price span, .pr-plan--featured .pr-price small { color: #c9cde4; }
.pr-features { display: grid; flex: 1; gap: 12px; list-style: none; margin: 0; padding: 0; }
.pr-features li { display: grid; font-size: 15.5px; gap: 12px; grid-template-columns: 22px 1fr; line-height: 1.4; }
.pr-features li::before { align-items: center; background: #eeebff; border-radius: 50%; color: var(--r3-indigo-dark); content: "✓"; display: flex; font-size: 12px; font-weight: 800; height: 22px; justify-content: center; width: 22px; }
.pr-plan--featured .pr-features li::before { background: var(--r3-lime); color: var(--r3-night); }
.pr-cta { align-items: center; background: var(--r3-night); border-radius: 14px; color: #fff; display: inline-flex; font-size: 16px; font-weight: 800; gap: 10px; justify-content: center; min-height: 54px; padding: 0 22px; text-align: center; text-decoration: none; transition: background-color .15s ease, transform .15s ease; }
.pr-cta:hover { background: var(--r3-indigo-dark); }
.pr-cta--accent { background: var(--r3-lime); color: var(--r3-night); }
.pr-cta--accent:hover { background: #e9ff9c; }
.pr-cta:focus-visible, .pr-link:focus-visible, .pr-faq summary:focus-visible { outline: 3px solid var(--r3-indigo); outline-offset: 3px; }
.pr-section { margin-top: clamp(56px, 8vw, 104px); }
.pr-section-head { margin-bottom: 24px; max-width: 720px; }
.pr-section-head h2 { color: var(--r3-ink); font-size: clamp(26px, 3vw, 40px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin: 0; }
.pr-section-head p { color: var(--r3-muted); font-size: 16px; line-height: 1.6; margin: 12px 0 0; }
.pr-table-wrap { background: var(--r3-paper); border: 1px solid var(--r3-line); border-radius: 24px; overflow: hidden; }
.pr-table { border-collapse: collapse; font-size: 15px; width: 100%; }
.pr-table th, .pr-table td { border-bottom: 1px solid var(--r3-line); padding: 16px 20px; text-align: left; vertical-align: middle; }
.pr-table thead th { background: var(--r3-cloud); color: var(--r3-muted); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pr-table tbody th { font-weight: 650; }
.pr-table td:nth-child(2) { color: var(--r3-muted); white-space: nowrap; }
.pr-table td:last-child, .pr-table thead th:last-child { background: rgba(91, 77, 242, .05); }
.pr-yes { align-items: center; color: var(--r3-indigo-dark); display: inline-flex; font-weight: 750; gap: 8px; }
.pr-yes::before { align-items: center; background: #eeebff; border-radius: 50%; content: "✓"; display: inline-flex; flex: none; font-size: 11px; height: 20px; justify-content: center; width: 20px; }
.pr-table tfoot th, .pr-table tfoot td { background: var(--r3-night) !important; border-bottom: 0; color: #fff; font-weight: 800; }
.pr-table tfoot td:nth-child(2) { color: #c9cde4; }
.pr-table tfoot strong { color: var(--r3-lime); font-size: 18px; }
.pr-faq { display: grid; gap: 10px; max-width: 820px; }
.pr-faq details { background: var(--r3-paper); border: 1px solid var(--r3-line); border-radius: 18px; }
.pr-faq details[open] { border-color: #c3bcff; box-shadow: 0 16px 40px -28px rgba(17, 22, 47, .35); }
.pr-faq summary { align-items: center; border-radius: 18px; cursor: pointer; display: flex; font-size: 16.5px; font-weight: 750; gap: 16px; justify-content: space-between; list-style: none; min-height: 60px; padding: 14px 20px; }
.pr-faq summary::-webkit-details-marker { display: none; }
.pr-faq summary::after { align-items: center; background: var(--r3-cloud); border-radius: 50%; color: var(--r3-ink); content: "+"; display: flex; flex: none; font-size: 20px; font-weight: 600; height: 32px; justify-content: center; transition: transform .2s ease; width: 32px; }
.pr-faq details[open] summary::after { transform: rotate(45deg); }
.pr-faq details p { color: var(--r3-muted); font-size: 15.5px; line-height: 1.6; margin: 0; padding: 0 20px 18px; }
.pr-final { align-items: center; background: radial-gradient(circle at 0 100%, rgba(120, 231, 255, .18), transparent 50%), radial-gradient(circle at 100% 0, rgba(91, 77, 242, .5), transparent 55%), var(--r3-night); border-radius: 28px; color: #fff; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; margin-top: clamp(56px, 8vw, 104px); padding: clamp(28px, 4vw, 48px); }
.pr-final h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0; }
.pr-final p { color: #c9cde4; font-size: 16px; margin: 10px 0 0; }
.pr-final-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px 20px; }
.pr-link { color: #fff; font-weight: 750; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 640px) {
  .pr-hero, .pr-hero > p { text-align: left; }
  .pr-hero h1 { margin-left: 0; }
  .pr-trust { justify-content: flex-start; }
  .pr-table thead { display: none; }
  .pr-table, .pr-table tbody, .pr-table tfoot, .pr-table tr { display: block; }
  .pr-table tr { border-bottom: 1px solid var(--r3-line); display: grid; gap: 4px 12px; grid-template-columns: 1fr auto; padding: 14px 16px; }
  .pr-table th, .pr-table td { background: none !important; border: 0; padding: 0; }
  .pr-table tbody th, .pr-table tfoot th { grid-column: 1 / -1; font-size: 15.5px; }
  .pr-table td { font-size: 14px; }
  .pr-table td::before { color: var(--r3-muted); content: attr(data-label) ": "; font-weight: 600; }
  .pr-table td:last-child { text-align: right; }
  .pr-table td:last-child::before { content: none; }
  .pr-table tfoot tr { background: var(--r3-night); }
  .pr-table tfoot td::before { color: #a9aed0; }
  .pr-final, .pr-final-actions { align-items: stretch; flex-direction: column; }
  .pr-final .pr-cta { width: 100%; }
  .pr-link { justify-content: center; }
}
.pr-features { align-content: start; }
@media (max-width: 760px) {
  html body.public-page .public-nav > a { justify-content: flex-start; text-align: left; }
}
@media (max-width: 640px) { .pr-hero .public-eyebrow { justify-content: flex-start; text-align: left; } }

/* Карточки материалов/планов/курсов на страницах преподавателя и направления */
html body.public-page .course-profile-card { text-decoration: none; }
html body.public-page .course-profile-card :is(h3, p, span, b, strong) { text-decoration: none; }
html body.public-page .course-profile-card h3 { font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -.035em; line-height: 1.08; overflow-wrap: anywhere; hyphens: auto; }
html body.public-page .course-profile-card:hover h3 { color: var(--r3-indigo-dark); }
html body.public-page .course-profile-card:focus-visible { outline: 3px solid var(--r3-indigo); outline-offset: 3px; }
html body.public-page .teacher-subject-pills a { font-size: 13px; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
html body.public-page :is(.public-field > span, .contact-copy dt) { font-size: 13px; }
@media (max-width: 760px) {
  html body.public-page .course-profile-card { min-height: 0; }
  html body.public-page .course-profile-card h3 { font-size: 24px; margin-block: 18px 10px; }
}
html body.public-page .subject-teacher-list > a { text-decoration: none; }
html body.public-page .subject-teacher-list small { font-size: 12px; }
html body.public-page .subject-teacher-list > a:hover h3 { color: var(--r3-indigo-dark); }
html body.public-page .subject-competencies article { min-height: 220px; }
@media (max-width: 760px) {
  html body.public-page .subject-competencies article { min-height: 0; padding: 22px 20px; }
  html body.public-page .subject-competencies article h3 { font-size: 26px; margin: 12px 0 8px; }
  html body.public-page .subject-teacher-list > a { gap: 14px; grid-template-columns: 52px minmax(0, 1fr) 24px; }
  html body.public-page .subject-teacher-list > a > span { height: 52px; width: 52px; font-size: 22px; }
  html body.public-page .subject-teacher-list h3 { font-size: 24px; }
}

/* Раунд 3 (fixer): подвал публичных страниц — не мельче 12 px. */
html body.public-page .public-footer-statement > span,
html body.public-page .public-footer-grid span,
html body.public-page .public-footer-bottom span { font-size: 12px; }
html body.public-page .public-brand .public-brand-type > em { font-size: 11px; }
