/* Academy-approved mobile rhythm. Only pages with the supported breadcrumb
 * load this file. Preserve desktop, content ordering, grids and inner card UI. */
@media (max-width: 689px) {
	/* Some empty commerce terms retain Blocksy's external content-block hero. */
	.mw-breadcrumb:is([data-family="product_category"], [data-family="volume"]) + [data-block] {
		margin-block-end: 15px;
	}
	.mw-breadcrumb:is([data-family="product_category"], [data-family="volume"]) + [data-block] + #main > :is(.ct-container, .ct-container-full)[data-vertical-spacing*="top"] {
		padding-block-start: 0;
	}
	.mw-breadcrumb + #main {
		--mw-page-section-gap: 15px;
	}

	/* Native Blocksy hero: a single gap after the complete heading surface. */
	.mw-breadcrumb + #main .hero-section[data-type="type-1"] {
		margin-block-end: var(--mw-page-section-gap) !important;
	}
	.mw-breadcrumb + #main .hero-section :is(.page-description, .academy-hub-hero-copy, .academy-collection-hero-copy, .academy-guide-hero-copy, .mw-magazine-hub-hero-copy, .mw-magazine-hub-wrap) {
		margin-block-end: 0 !important;
	}
	.mw-breadcrumb + #main .learndash-wrapper--lesson > .ld-tabs:first-child {
		margin-block-start: 0;
	}
	/* Native boxed Lessons add another 20px before the hero and 1px on
	 * either side. The shared outer shell already supplies the site edges. */
	.mw-breadcrumb[data-family="guide"] + #main > .ct-container-full > article {
		padding-block-start: 0;
		padding-inline: 0;
	}
	.mw-breadcrumb + #main .mariwork-faq-stage > .mariwork-faq-intro {
		margin-block-end: var(--mw-page-section-gap);
	}

	/* Commerce preserves its filter row and product grid. The gap ends at
 * the first controls row, rather than at whitespace inside product images. */
	.mw-breadcrumb + #main .woocommerce-products-header :is(.shop-hero, .commercial-hero) {
		margin-block-end: var(--mw-page-section-gap) !important;
	}

	/* Artist profile has a custom hero and its own outer padding. */
	.mw-breadcrumb + #main .mw-artist-main {
		padding-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-artist-hero + .mw-artist-stories {
		margin-block-start: var(--mw-page-section-gap);
	}
	.mw-breadcrumb + #main .product-entry-wrapper > .woocommerce-product-gallery {
		margin-block-end: var(--mw-page-section-gap);
	}

	/* Brand/contact/store-location pages place the hero inside their content.
 * Remove only the extra external whitespace of the first two sections. */
	.mw-breadcrumb + #main :is(.mw-about-hero, .mw-why-hero, .mw-contact-hero, .mw-stores-hero) {
		padding-block: 0 !important;
		margin-block-end: var(--mw-page-section-gap);
	}
	.mw-breadcrumb + #main :is(.mw-about-hero, .mw-why-hero, .mw-contact-hero, .mw-stores-hero) + section {
		padding-block-start: 0 !important;
	}

	/* Help owns a separate main and fragment replacement. Its private pilot
 * notice stays in the document; it starts at the same first-content position. */
	.mw-breadcrumb + #main .mw-help-center-wrap {
		padding-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-help-center__header {
		margin-block: 0 15px;
	}
	.mw-breadcrumb + #main .mw-help-center__header > h1 {
		margin-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-help-center__pilot {
		margin-block-end: 15px;
	}
	.mw-breadcrumb + #main :is(.mw-help-center__collection-heading, .mw-help-center__guided) {
		margin-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-help-center__collection-heading {
		margin-block-end: 15px;
	}
	.mw-breadcrumb + #main .mw-help-center__collection-heading + .mw-help-center__subtopic {
		margin-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-help-center__search {
		margin-block-end: 15px;
	}
}

/* Owner desktop equivalent: provisional mobile +8px outer rhythm. */
@media (min-width: 690px) {
	/* Some empty commerce terms retain Blocksy's external content-block hero. */
	.mw-breadcrumb:is([data-family="product_category"], [data-family="volume"]) + [data-block] {
		margin-block-end: 23px;
	}
	.mw-breadcrumb:is([data-family="product_category"], [data-family="volume"]) + [data-block] + #main > :is(.ct-container, .ct-container-full)[data-vertical-spacing*="top"] {
		padding-block-start: 0;
	}
	.mw-breadcrumb + #main {
		--mw-page-section-gap: 23px;
	}

	/* Native Blocksy hero: a single gap after the complete heading surface. */
	.mw-breadcrumb + #main .hero-section[data-type="type-1"] {
		margin-block-end: var(--mw-page-section-gap) !important;
	}
	.mw-breadcrumb + #main .hero-section :is(.page-description, .academy-hub-hero-copy, .academy-collection-hero-copy, .academy-guide-hero-copy, .mw-magazine-hub-hero-copy, .mw-magazine-hub-wrap) {
		margin-block-end: 0 !important;
	}
	.mw-breadcrumb + #main .learndash-wrapper--lesson > .ld-tabs:first-child {
		margin-block-start: 0;
	}
	/* Native boxed Lessons add another 20px before the hero and 1px on
	 * either side. The shared outer shell already supplies the site edges. */
	.mw-breadcrumb[data-family="guide"] + #main > .ct-container-full > article {
		padding-block-start: 0;
		padding-inline: 0;
	}
	.mw-breadcrumb + #main .mariwork-faq-stage > .mariwork-faq-intro {
		margin-block-end: var(--mw-page-section-gap);
	}

	/* Commerce preserves its filter row and product grid. The gap ends at
 * the first controls row, rather than at whitespace inside product images. */
	.mw-breadcrumb + #main .woocommerce-products-header :is(.shop-hero, .commercial-hero) {
		margin-block-end: var(--mw-page-section-gap) !important;
	}

	/* Artist profile has a custom hero and its own outer padding. */
	.mw-breadcrumb + #main .mw-artist-main {
		padding-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-artist-hero + .mw-artist-stories {
		margin-block-start: var(--mw-page-section-gap);
	}

	/* Brand/contact/store-location pages place the hero inside their content.
 * Remove only the extra external whitespace of the first two sections. */
	.mw-breadcrumb + #main :is(.mw-about-hero, .mw-why-hero, .mw-contact-hero, .mw-stores-hero) {
		padding-block: 0 !important;
		margin-block-end: var(--mw-page-section-gap);
	}
	.mw-breadcrumb + #main :is(.mw-about-hero, .mw-why-hero, .mw-contact-hero, .mw-stores-hero) + section {
		padding-block-start: 0 !important;
	}

	/* Help owns a separate main and fragment replacement. Its private pilot
 * notice stays in the document; it starts at the same first-content position. */
	.mw-breadcrumb + #main .mw-help-center-wrap {
		padding-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-help-center__header {
		margin-block: 0 23px;
	}
	.mw-breadcrumb + #main .mw-help-center__header > h1 {
		margin-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-help-center__pilot {
		margin-block-end: 23px;
	}
	.mw-breadcrumb + #main :is(.mw-help-center__collection-heading, .mw-help-center__guided) {
		margin-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-help-center__collection-heading {
		margin-block-end: 23px;
	}
	.mw-breadcrumb + #main .mw-help-center__collection-heading + .mw-help-center__subtopic {
		margin-block-start: 0;
	}
	.mw-breadcrumb + #main .mw-help-center__search {
		margin-block-end: 23px;
	}

	/* Keep shared Course facts and the first section on the same rhythm. */
	.mw-breadcrumb + #main .learndash-wrapper--course > .mariwork-academy-course-facts { margin-block-end: 23px; }
	.mw-breadcrumb + #main .learndash-wrapper--course > .ld-tabs { margin-block: 0; }
	.mw-breadcrumb + #main .learndash-wrapper--course .ld-item-list.ld-lesson-list { margin-block-start: 0; }
	.mw-breadcrumb + #main .learndash-wrapper--course .ld-item-list-items > .ld-item-list-section-heading:first-child .ld-lesson-section-heading { margin-block-start: 0; }
}

/* Owner correction: one Blocksy outer box for every desktop page family.
 * Inner reading measures and card grids retain their domain rules. */
@media (min-width:690px){
 body:has(.mw-breadcrumb):is(.blog,.category) #main > .ct-container {
  max-width:var(--theme-normal-container-max-width,1290px);
 }
 body:has(.mw-breadcrumb).single-post #main > [class*="ct-container"] {
  --theme-container-width:var(--theme-container-width-base,90vw);
  --theme-narrow-container-max-width:var(--theme-normal-container-max-width,1290px);
 }
 .mw-breadcrumb + #main article.type-post > :is(.ct-featured-image,.hero-section,.entry-content) {
  width:var(--theme-container-width-base,90vw);
  max-width:var(--theme-normal-container-max-width,1290px);
 }
 .mw-breadcrumb + #main .mw-help-center {
  max-inline-size:var(--theme-normal-container-max-width,1290px);
 }
}

/* Guide pages currently use the standard site measure by Owner direction. */
@media (min-width:690px){
 body:has(.mw-breadcrumb):is(.single-sfwd-lessons,.single-sfwd-topic){
  --mw-academy-learning-content-width:100%;
 }
 .mw-breadcrumb[data-family="guide"] + #main > .ct-container-full > article > .entry-content {
  width:min(var(--theme-container-width-base,90vw),var(--theme-normal-container-max-width,1290px));
  max-width:var(--theme-normal-container-max-width,1290px);
  margin-inline:auto;
 }
 .mw-breadcrumb + #main .mariwork-faq-stage {
  width:var(--theme-container-width,90vw);
  max-width:var(--theme-normal-container-max-width,1290px);
  box-sizing:border-box;
 }
 .mw-breadcrumb + #main .mwbo {
  width:var(--theme-container-width,90vw);
  max-width:var(--theme-normal-container-max-width,1290px);
  box-sizing:border-box;
 }
}

@media (min-width:690px){
 .mw-breadcrumb[data-family="guide"] + #main > .ct-container-full > article > .entry-content.is-layout-constrained > .learndash {
  width:100%;max-width:100%;
 }
}

@media (min-width:690px){
 .mw-breadcrumb[data-family="guide"] + #main > .ct-container-full {
  --theme-narrow-container-max-width:var(--theme-normal-container-max-width,1290px);
 }
 .mw-breadcrumb[data-family="guide"] + #main > .ct-container-full > article {
  width:100%;max-width:var(--theme-normal-container-max-width,1290px);
 }
}

/* Match the actual first content, including nested native tools/text. */
@media (min-width:690px){
 .mw-breadcrumb[data-family="fast_buy"] + #main .mwbo {padding-block-start:0;}
 .mw-breadcrumb[data-family="fast_buy"] + #main .mwbo > .mwbo-top-tools {margin-block-start:0;}
 .mw-breadcrumb[data-family="article"] + #main article.type-post > .hero-section + .entry-content {padding-block-start:0;}
}
