/* VibeCode — главная: прототип на сетке 12 col */

.home-apple {
  --ink: #000000;
  --bg: #fafcfb;
  --bg-card: #ffffff;
  --bg-muted: #f3f5f4;
  --hero-bg: #fafcfb;
  --section-alt: #f3f6fc;
  --line: rgba(0, 0, 0, 0.09);
  --link: #635bff;
  --link-hover: #533afd;
  --link-visited: #4b44c8;
  --link-line: rgba(99, 91, 255, 0.35);
  --surface: rgba(99, 91, 255, 0.04);
  --accent-bg: #f5f3ff;
  --placeholder: #e4e6eb;
  --placeholder-border: rgba(0, 0, 0, 0.08);

  --font-ui: "Jost", Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --grid-columns: 12;
  --grid-margin: 60px;
  --grid-gutter: 40px;
  --grid-row-gap: 40px;

  --type-h1: clamp(2.25rem, 5vw, 3.5rem);
  --type-h2: clamp(1.625rem, 2.5vw, 2.125rem);
  --type-h3: 1.0625rem;
  --type-body: 1.0625rem;
  --type-small: 0.8125rem;

  --section-pad-y: clamp(4rem, 8vw, 6rem);

  --text-muted: rgba(0, 0, 0, 0.55);
  --text-soft: rgba(0, 0, 0, 0.4);

  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--type-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.home-apple p {
  margin: 0;
  text-wrap: pretty;
  hyphens: auto;
  overflow-wrap: break-word;
}

.home-apple main a:not(.premium-button) {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--link-line);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.home-apple main a:not(.premium-button):visited {
  color: var(--link-visited);
}

.home-apple main a:not(.premium-button):hover {
  color: var(--link-hover);
  background: rgba(0, 0, 0, 0.06);
}

/* ——— Сетка 12 · margin 60 · gutter 40 · stretch ——— */
.home-apple .home-grid {
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--grid-margin);
  padding-right: var(--grid-margin);
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--grid-gutter);
  row-gap: var(--grid-row-gap);
  align-items: stretch;
}

.home-apple [class*="col-span-"] {
  min-width: 0;
}

.home-apple .col-span-3 { grid-column: span 3; }
.home-apple .col-span-4 { grid-column: span 4; }
.home-apple .col-span-5 { grid-column: span 5; }
.home-apple .col-span-6 { grid-column: span 6; }
.home-apple .col-span-7 { grid-column: span 7; }
.home-apple .col-span-8 { grid-column: span 8; }
.home-apple .col-span-12 { grid-column: span 12; }

/* Прототип: подсветка колонок (убрать класс home-prototype с body) */
.home-apple.home-prototype .home-grid {
  position: relative;
  background-image: repeating-linear-gradient(
    to right,
    rgba(99, 91, 255, 0.06) 0,
    rgba(99, 91, 255, 0.06) calc((100% - (var(--grid-columns) - 1) * var(--grid-gutter)) / var(--grid-columns)),
    transparent calc((100% - (var(--grid-columns) - 1) * var(--grid-gutter)) / var(--grid-columns)),
    transparent calc((100% - (var(--grid-columns) - 1) * var(--grid-gutter)) / var(--grid-columns) + var(--grid-gutter))
  );
}

.home-apple.home-prototype .home-grid > * {
  outline: 1px dashed rgba(99, 91, 255, 0.35);
  outline-offset: -1px;
  background: rgba(255, 255, 255, 0.72);
}

/* Типографика */
.home-apple .home-h1,
.home-apple .home-h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.home-apple .home-h1 {
  font-size: 40px;
  color: #36393d;
}
.home-apple .home-h2 { font-size: var(--type-h2); }

.home-apple .home-h3,
.home-apple .home-step__title,
.home-apple .home-topic h3,
.home-apple .home-details dt {
  font-family: var(--font-ui);
  font-size: var(--type-h3);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}

.home-apple .home-eyebrow {
  margin: 0;
  font-size: var(--type-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.home-apple .home-eyebrow--accent {
  color: var(--link);
}

.home-apple .home-lead {
  font-size: clamp(1.0625rem, 1.15vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-muted);
}

.home-apple .home-section-lead {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Секции */
.home-apple .home-section {
  padding-top: clamp(3.5rem, 8vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 5.5rem);
  border-top: none;
  background: var(--bg);
}

.home-apple .home-section-head--center {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.home-apple .home-section-head--center .home-section-lead {
  margin-left: auto;
  margin-right: auto;
}

.home-apple .home-hero {
  padding-top: 0;
  padding-bottom: 0;
  background: var(--hero-bg);
}

/* Hero: фон 1изображение.png — цвет фрейма = центр картинки (#FAFCFB) */
.home-apple .home-hero__stage {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(520px, 82vh, 760px);
  padding: clamp(3rem, 8vh, 5rem) 0;
  overflow: hidden;
  background: var(--hero-bg);
}

.home-apple .home-hero__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, var(--hero-bg) 0%, transparent 22%),
    linear-gradient(to top, var(--bg) 0%, transparent 28%);
}

.home-apple .home-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  pointer-events: none;
  user-select: none;
}

.home-apple .home-placeholder {
  display: block;
  background: var(--placeholder);
  border: 1px solid var(--placeholder-border);
}

.home-apple .home-hero__grid {
  position: relative;
  z-index: 2;
  width: 100%;
}

.home-apple .home-hero__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  max-width: 40rem;
  margin: 0 auto;
}

.home-apple .home-h1--hero {
  font-family: var(--font-ui);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #36393d;
  max-width: 16ch;
  text-wrap: balance;
}

.home-apple .home-lead--hero {
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 34ch;
}

.home-apple .home-hero__form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 28rem;
  margin-top: 0.25rem;
}

.home-apple .home-hero__input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-apple .home-hero__input::placeholder {
  color: rgba(0, 0, 0, 0.38);
}

.home-apple .home-hero__input:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.18);
}

.home-apple .home-hero__submit {
  flex: 0 0 auto;
  white-space: nowrap;
}

.home-apple .home-hero__legal {
  margin: 0;
  max-width: 26rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.home-apple .home-hero__legal a {
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.home-apple .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Showcase: широкий плейсхолдер под hero */
.home-apple .home-path {
  padding-top: clamp(2.5rem, 6vw, 4rem);
}

.home-apple .home-hero__meta {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-soft);
}

/* Маршрут: 4 карточки */
.home-apple .home-path__steps {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--grid-gutter);
  row-gap: var(--grid-gutter);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-apple .home-step {
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-card);
}

.home-apple .home-step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  color: var(--link);
  background: rgba(99, 91, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.12);
}

.home-apple .home-step__icon svg {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.home-apple .home-step:hover .home-step__icon {
  color: var(--link-hover);
  background: rgba(99, 91, 255, 0.14);
}

.home-apple .home-step__num {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.home-apple .home-step__title {
  margin-top: 0.5rem;
}

.home-apple .home-step__text {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* О курсе: 3 колонки */
.home-apple .home-feature {
  padding: 0;
}

.home-apple .home-feature__icon {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: none;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  margin-bottom: 1.25rem;
  background: var(--bg);
}

.home-apple .home-feature__text {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* О курсе / программа: общее фото на мобилке, в карточках — на десктопе */
.home-apple .home-about__figure,
.home-apple .home-program__figure {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
}

.home-apple .home-about__figure-img,
.home-apple .home-program__figure-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  background: var(--bg);
}

.home-apple .home-program__figure-img {
  object-position: center 38%;
}

@media (min-width: 1025px) {
  .home-apple .home-about__figure,
  .home-apple .home-program__figure {
    display: none;
  }
}

/* О курсе и программа на планшете и мобилке: одно фото, затем блоки столбиком */
@media (max-width: 1024px) {
  .home-apple {
    --home-stack-gap: clamp(1.25rem, 4vw, 1.75rem);
  }

  .home-apple .home-about__figure,
  .home-apple .home-program__figure {
    display: block;
    grid-column: 1 / -1;
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
  }

  .home-apple .home-about .home-section-head--center,
  .home-apple .home-program .home-section-head--center {
    max-width: none;
  }

  .home-apple .home-about .home-feature,
  .home-apple .home-program .home-topic {
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .home-apple .home-about .home-feature + .home-feature,
  .home-apple .home-program .home-topic + .home-topic {
    margin-top: var(--home-stack-gap);
    padding-top: var(--home-stack-gap);
    border-top: 1px solid var(--line);
  }

  .home-apple .home-about .home-feature .home-h3,
  .home-apple .home-program .home-topic .home-h3,
  .home-apple .home-program .home-topic h3 {
    margin: 0 0 0.5rem;
    padding: 0;
    text-align: left;
  }

  .home-apple .home-about .home-feature__text,
  .home-apple .home-program .home-topic__text,
  .home-apple .home-program .home-topic p {
    margin: 0;
    padding: 0;
    text-align: left;
    text-wrap: pretty;
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: normal;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--text-muted);
  }

  .home-apple .home-about .home-feature__icon,
  .home-apple .home-program .home-topic__media,
  .home-apple .home-program .home-topic__media--desktop {
    display: none !important;
  }
}

/* Программа */
.home-apple .home-program {
  background: var(--bg-muted);
}

.home-apple .home-topic {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

@media (min-width: 1025px) {
  .home-apple .home-topic img,
  .home-apple .home-topic__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
    object-position: center;
    background: var(--bg);
  }

  .home-apple .home-topic h3,
  .home-apple .home-topic .home-h3 {
    margin: 1.25rem 1.5rem 0.5rem;
    padding: 0;
  }

  .home-apple .home-topic p,
  .home-apple .home-topic__text {
    margin: 0;
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.55;
  }
}

.home-apple .home-topic__media.home-placeholder {
  aspect-ratio: 16 / 10;
  min-height: 140px;
  border: none;
  border-bottom: 1px solid var(--placeholder-border);
  border-radius: 0;
}

/* CTA */
.home-apple .home-cta {
  background: var(--accent-bg);
}

.home-apple .home-cta__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  max-width: 32rem;
  margin: 0 auto;
}

.home-apple .home-cta__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Кнопки */
.home-apple .premium-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom: none;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.home-apple .premium-button--primary {
  background: var(--link);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 91, 255, 0.28);
}

.home-apple .premium-button--primary:hover {
  background: var(--link-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* Шапка */
.home-apple .premium-header {
  background: rgba(250, 252, 251, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}

.home-apple .premium-header .site-nav {
  gap: clamp(16px, 2.2vw, 28px);
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.home-apple .premium-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: #36393d;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease;
}

.home-apple .premium-header .brand:hover,
.home-apple .premium-header .brand:focus-visible {
  color: var(--ink);
  background: transparent;
}

.home-apple .premium-header .site-nav a,
.home-apple .premium-header .site-nav a:visited {
  padding: 0.25rem 0;
  border-radius: 0;
  border-bottom: none;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.55);
  background: transparent;
  transition: color 0.2s ease;
}

.home-apple .premium-header .site-nav a:hover,
.home-apple .premium-header .site-nav a:focus-visible {
  background: transparent;
  color: var(--link);
}

.home-apple .premium-header .site-nav a[aria-current="page"] {
  color: var(--ink);
}

.home-apple .premium-header .brand-mark {
  width: auto;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: var(--link);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(99, 91, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.home-apple .premium-header .brand:hover .brand-mark,
.home-apple .premium-header .brand:focus-visible .brand-mark {
  background: var(--link-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 91, 255, 0.34);
}

/* Подвал */
.home-apple .premium-footer {
  --footer-bg: hsl(243, 42%, 11%);
  --footer-text: rgba(255, 255, 255, 0.68);
  --footer-text-soft: rgba(255, 255, 255, 0.45);
  --footer-link: #c4c0ff;
  --footer-link-hover: #ffffff;
  --footer-line: rgba(255, 255, 255, 0.1);

  background: var(--footer-bg);
  border-top: 1px solid rgba(99, 91, 255, 0.22);
  color: var(--footer-text);
}

.home-apple .premium-footer .brand {
  color: #fff;
  border-bottom: none;
}

.home-apple .premium-footer .brand-mark {
  background: var(--link);
  color: #fff;
}

.home-apple .premium-footer a:not(.brand) {
  color: var(--footer-link);
  border-bottom: none;
}

.home-apple .premium-footer a:not(.brand):hover {
  color: var(--footer-link-hover);
  background: transparent;
}

.home-apple .premium-footer .copyright {
  color: var(--footer-text-soft);
  border-top: 1px solid var(--footer-line);
}

@media (max-width: 760px) {
  .home-apple .premium-header .brand {
    font-size: 0.9375rem;
    gap: 0.5rem;
  }

  .home-apple .premium-header .brand-mark {
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.65rem;
    font-size: 0.75rem;
    border-radius: 999px;
  }

  .home-apple .premium-header .site-nav {
    gap: 4px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .home-apple .premium-header .site-nav a {
    min-height: 44px;
    padding: 10px 0;
    border-radius: 0;
    font-weight: 500;
  }

  .home-apple .premium-header .site-nav a:hover,
  .home-apple .premium-header .site-nav a:focus-visible {
    background: transparent;
    color: var(--link);
  }
}

/* Адаптив: сетка сохраняется, колонки складываются */
@media (max-width: 1100px) {
  .home-apple {
    --grid-margin: clamp(24px, 5vw, 60px);
    --grid-gutter: clamp(20px, 3vw, 40px);
    --grid-row-gap: clamp(20px, 3vw, 40px);
  }
}

/* Мобилка по референсу: 4×60, gutter 20, поле 300px, боковые отступы от центрирования */
@media (max-width: 760px) {
  .home-apple {
    --mobile-grid-width: min(300px, calc(100vw - 32px));
    --mobile-grid-margin: max(16px, calc((100vw - var(--mobile-grid-width)) / 2));
    --mobile-grid-gutter: 20px;
    --mobile-grid-column: 60px;
    --grid-margin: var(--mobile-grid-margin);
    --grid-gutter: var(--mobile-grid-gutter);
    --grid-row-gap: var(--mobile-grid-gutter);
  }

  .home-apple .site-header.premium-header {
    padding-left: var(--mobile-grid-margin);
    padding-right: var(--mobile-grid-margin);
  }

  .home-apple .home-grid {
    padding-left: var(--mobile-grid-margin);
    padding-right: var(--mobile-grid-margin);
  }

  .home-apple .home-hero__center,
  .home-apple .home-hero__form,
  .home-apple .home-hero__legal,
  .home-apple .home-hero__meta {
    width: 100%;
    max-width: var(--mobile-grid-width);
  }

  .home-apple.show-mobile-grid::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 9999;
    width: var(--mobile-grid-width);
    pointer-events: none;
    transform: translateX(-50%);
    background:
      linear-gradient(
        to right,
        rgba(99, 91, 255, 0.14) 0 var(--mobile-grid-column),
        transparent var(--mobile-grid-column) calc(var(--mobile-grid-column) + var(--mobile-grid-gutter)),
        rgba(99, 91, 255, 0.14) calc(var(--mobile-grid-column) + var(--mobile-grid-gutter)) calc((var(--mobile-grid-column) * 2) + var(--mobile-grid-gutter)),
        transparent calc((var(--mobile-grid-column) * 2) + var(--mobile-grid-gutter)) calc((var(--mobile-grid-column) * 2) + (var(--mobile-grid-gutter) * 2)),
        rgba(99, 91, 255, 0.14) calc((var(--mobile-grid-column) * 2) + (var(--mobile-grid-gutter) * 2)) calc((var(--mobile-grid-column) * 3) + (var(--mobile-grid-gutter) * 2)),
        transparent calc((var(--mobile-grid-column) * 3) + (var(--mobile-grid-gutter) * 2)) calc((var(--mobile-grid-column) * 3) + (var(--mobile-grid-gutter) * 3)),
        rgba(99, 91, 255, 0.14) calc((var(--mobile-grid-column) * 3) + (var(--mobile-grid-gutter) * 3)) var(--mobile-grid-width)
      );
    box-shadow:
      inset 1px 0 rgba(99, 91, 255, 0.32),
      inset -1px 0 rgba(99, 91, 255, 0.32);
  }
}

@media (max-width: 800px) {
  .home-apple .home-hero__stage {
    min-height: auto;
    padding: clamp(2.5rem, 10vw, 3.5rem) 0;
  }

  .home-apple .home-h1--hero {
    max-width: none;
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .home-apple .home-lead--hero {
    max-width: none;
  }

  .home-apple .home-hero__form {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
  }

  .home-apple .home-hero__input,
  .home-apple .home-hero__submit {
    flex: 0 0 auto;
    width: 100%;
    min-height: 3rem;
    height: 3rem;
    box-sizing: border-box;
  }

  .home-apple .home-hero__input {
    padding-top: 0;
    padding-bottom: 0;
  }

  .home-apple .home-hero__submit {
    padding-top: 0;
    padding-bottom: 0;
  }

  .home-apple .col-span-4,
  .home-apple .col-span-6,
  .home-apple .col-span-8,
  .home-apple .col-span-7,
  .home-apple .col-span-5 {
    grid-column: span 12;
  }

  .home-apple .home-path__steps .home-step {
    grid-column: span 6;
  }

  .home-apple .col-span-3 {
    grid-column: span 6;
  }

  .home-apple .home-cta__center .premium-button {
    width: 100%;
    max-width: 20rem;
  }
}

@media (max-width: 520px) {
  .home-apple .col-span-3,
  .home-apple .home-path__steps .home-step {
    grid-column: span 12;
  }

  .home-apple .premium-button {
    width: 100%;
  }
}

/* Мобильная программа / о курсе — перебивает legacy styles.css */
@media (max-width: 1024px) {
  body.home-apple .home-program__figure,
  body.home-apple .home-about__figure {
    display: block !important;
  }

  body.home-apple .home-program .premium-lesson img,
  body.home-apple .home-program .home-topic__media,
  body.home-apple .home-about .home-feature__icon {
    display: none !important;
  }

  body.home-apple .home-program .home-topic.premium-lesson {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.home-apple .home-program .home-topic + .home-topic,
  body.home-apple .home-about .home-feature + .home-feature {
    margin-top: var(--home-stack-gap, clamp(1.25rem, 4vw, 1.75rem)) !important;
    padding-top: var(--home-stack-gap, clamp(1.25rem, 4vw, 1.75rem)) !important;
    border-top: 1px solid var(--line) !important;
  }

  body.home-apple .home-program .home-topic h3,
  body.home-apple .home-program .home-topic .home-h3 {
    margin: 0 0 0.5rem !important;
    padding: 0 !important;
  }

  body.home-apple .home-program .home-topic p,
  body.home-apple .home-program .home-topic__text {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Мобильная шапка: единые правила, перебивают конфликты styles.css */
@media (max-width: 1024px) {
  .home-apple .site-header.premium-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    width: 100%;
    box-sizing: border-box;
  }

  .home-apple .premium-header .brand {
    min-width: 0;
    justify-self: start;
  }

  .home-apple .premium-header .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    justify-self: end;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .home-apple .premium-header .menu-toggle span {
    position: absolute;
    left: 50%;
    display: block;
    width: 22px;
    height: 2px;
    margin: 0;
    border-radius: 2px;
    background: #36393d;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  }

  .home-apple .premium-header .menu-toggle span:nth-child(1) {
    top: 16px;
    transform: translateX(-50%);
  }

  .home-apple .premium-header .menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .home-apple .premium-header .menu-toggle span:nth-child(3) {
    bottom: 16px;
    transform: translateX(-50%);
  }

  .home-apple .premium-header .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .home-apple .premium-header .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .home-apple .premium-header .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .home-apple .premium-header .site-nav:not(.open) {
    display: none !important;
  }

  .home-apple .premium-header .site-nav.open {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    width: 100%;
    gap: 4px;
    padding: 8px 0 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-card);
  }

  .home-apple .premium-header .site-nav.open a {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
  }
}
