/* FINAL LAUNCH SPACING — 2026-10-07
   Loaded last. Keeps the editorial layout but removes oversized empty zones. */

@media (min-width: 769px) {
  html body main.file-page .file-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 88px var(--gutter) 56px !important;
    display: grid !important;
    grid-template-columns: minmax(0,1.65fr) minmax(320px,.75fr) !important;
    grid-template-rows: auto !important;
    align-items: end !important;
    column-gap: 64px !important;
  }
  html body main.file-page .file-hero h1 {
    grid-column: 1 !important;
    margin: 0 !important;
    align-self: end !important;
  }
  html body main.file-page .file-intro {
    grid-column: 2 !important;
    margin: 0 0 4px !important;
    align-self: end !important;
    justify-self: end !important;
    max-width: 440px !important;
  }
  html body main.file-page .file-services { padding: 26px var(--gutter) 38px !important; }
  html body main.file-page .service-row summary { min-height: 78px !important; }
  html body main.file-page .price-file { padding: 44px var(--gutter) 50px !important; }
  html body main.file-page .price-heading { margin-bottom: 24px !important; }
  html body main.file-page .retainer-file { padding: 46px var(--gutter) 48px !important; }

  html body .related-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 88px var(--gutter) 52px !important;
  }
  html body .related-links { padding-top: 20px !important; padding-bottom: 38px !important; }

  html body .about-file-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 88px var(--gutter) 54px !important;
  }
  html body .experience-file,
  html body .practice-file,
  html body .reviews-file,
  html body .education-file { padding: 44px var(--gutter) 50px !important; }
  html body .section-file-heading { margin-bottom: 28px !important; }
  html body .education-file > h2 { margin-bottom: 26px !important; }
}

@media (max-width: 768px) {
  html body main.file-page .file-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 88px var(--gutter) 34px !important;
    display: block !important;
  }
  html body main.file-page .file-hero h1 {
    margin: 0 0 22px !important;
    align-self: auto !important;
    font-size: clamp(42px, 12vw, 54px) !important;
    line-height: .95 !important;
  }
  html body main.file-page .file-intro {
    margin: 0 !important;
    max-width: 100% !important;
    align-self: auto !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
  }
  html body main.file-page .file-services { padding: 10px var(--gutter) 22px !important; }
  html body main.file-page .service-row summary { min-height: 70px !important; padding: 11px 0 !important; }
  html body main.file-page .service-row h2 { font-size: 27px !important; }
  html body main.file-page .price-file { padding: 30px var(--gutter) 36px !important; }
  html body main.file-page .price-heading { margin-bottom: 18px !important; }
  html body main.file-page .retainer-file { padding: 34px var(--gutter) 36px !important; }
  html body main.file-page .retainer-file > div { margin-top: 22px !important; }

  html body .related-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 88px var(--gutter) 34px !important;
    display: block !important;
  }
  html body .related-hero h1 { margin: 0 !important; font-size: 44px !important; line-height: .95 !important; }
  html body .related-links { padding: 8px var(--gutter) 22px !important; }
  html body .related-link { min-height: 118px !important; padding: 20px 0 !important; }

  html body .about-file-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 88px var(--gutter) 34px !important;
    display: block !important;
  }
  html body .about-file-hero h1 { margin: 0 !important; font-size: 44px !important; line-height: .95 !important; }
  html body .experience-file,
  html body .practice-file,
  html body .reviews-file,
  html body .education-file { padding: 26px var(--gutter) 32px !important; }
  html body .section-file-heading { margin-bottom: 20px !important; }
  html body .section-file-heading h2,
  html body .education-file > h2 { font-size: 42px !important; line-height: .96 !important; }
  html body .education-file > h2 { margin-bottom: 18px !important; }
  html body .education-file article { padding: 13px 0 !important; }

  /* Home: reduce the gap between “Выберите раздел” and the folders. */
  html body .archive-section { padding: 28px var(--gutter) 36px !important; }
  html body .archive-heading { margin-bottom: 18px !important; }
  html body .folder-stack {
    --folder-top: 28px !important;
    --folder-step: 150px !important;
    height: calc(var(--folder-top) + var(--folder-step) + var(--folder-step) + var(--folder-step) + var(--folder-step) + 220px) !important;
  }
}
