/* Shared reading rhythm. Card, form and simulation internals keep their own layout. */
@media screen {
  :root {
    --o360-space-section: 72px;
    --o360-space-heading: 22px;
    --o360-space-subsection: 32px;
    --o360-space-title: 24px;
    --o360-space-actions: 24px;
    --o360-space-eyebrow: 12px;
  }

  @media (max-width: 1200px) {
    :root {
      --o360-space-section: 64px;
      --o360-space-heading: 20px;
      --o360-space-subsection: 28px;
      --o360-space-title: 22px;
    }
  }
  @media (max-width: 600px) {
    :root {
      --o360-space-section: 48px;
      --o360-space-heading: 18px;
      --o360-space-subsection: 24px;
      --o360-space-title: 20px;
    }
  }

  :is(.public-marketing-shell main, main.home-rebuild) h1 { margin-block-end: 0; }
  :is(.public-marketing-shell main, main.home-rebuild) h1 + p { margin-block-start: var(--o360-space-title); }
  :is(.public-marketing-shell main, main.home-rebuild) :is(.eyebrow, .demo-eyebrow, .kicker):has(+ :is(h1, h2, h3)) { margin-block-end: 0; }
  :is(.public-marketing-shell main, main.home-rebuild) :is(.eyebrow, .demo-eyebrow, .kicker) + :is(h1, h2, h3) { margin-block-start: var(--o360-space-eyebrow); }
  main.home-rebuild .home-hero-copy > .kicker { display: block; }

  .public-marketing-shell main.search-page > article > h2 {
    margin-block: var(--o360-space-section) var(--o360-space-heading);
  }
  .public-marketing-shell main.search-page > article > :is(p:not(.eyebrow), ul, ol) + h3 {
    margin-block: var(--o360-space-subsection) 16px;
  }

  .public-marketing-shell main.knowledge-article > article > :is(
    .article-definition, .article-section, .article-example, .article-failures,
    .article-tool, .article-sources, :where(#faq), .article-related
  ),
  .public-marketing-shell main.search-page > article > :is(
    .comparison-editorial-section, .cluster-introduction, .cluster-guide-list,
    .reviewer-areas, .reviewer-articles, .about-people, .about-environments,
    .operations-ai-boundary, .ai-autonomy-disclosure, .knowledge-intelligence-cluster,
    .search-cta
  ) { margin-block-start: var(--o360-space-section); }

  .public-marketing-shell main.knowledge-article > article > :is(.article-opening, .article-credibility) {
    margin-block-start: var(--o360-space-subsection);
  }
  .public-marketing-shell main.knowledge-article :is(
    .article-section, .article-definition, .article-failures, .article-sources,
    :where(#faq), .article-related
  ) > h2,
  .public-marketing-shell main .comparison-editorial-section > h2 {
    margin-block: 0 var(--o360-space-heading);
  }

  /* Full-width lifecycle bands use padding once, instead of margin plus padding. */
  .public-marketing-shell main.knowledge-article.lifecycle-article > article > .article-section {
    margin-block-start: 0;
    padding-block: var(--o360-space-section);
  }

  :is(.public-marketing-shell main, main.home-rebuild) :is(.hero-actions, .home-hero-actions, .demo-hero-actions) {
    gap: 12px;
  }
  :is(.public-marketing-shell main, main.home-rebuild) :is(.hero-actions, .home-hero-actions, .demo-hero-actions):not(:first-child) {
    margin-block-start: var(--o360-space-actions);
  }
  .public-marketing-shell main .hero-actions:first-child { margin-block-start: 0; }
  .public-marketing-shell main .hero-actions + :is(h2, h3) {
    margin-block-start: var(--o360-space-subsection);
    padding-block-start: 0;
  }

  main.home-rebuild > :is(
    .home-problem, .home-connected-story, .home-product, .home-intelligence,
    .home-production-operations, .home-credibility, .home-faq
  ),
  .public-marketing-shell main.conversion-page > .demo-role-paths {
    padding-block: var(--o360-space-section);
  }
}
