/* Final layout contract. Native content, media and interaction controllers stay intact. */
body:is(.mb-elementor-page, .mbpse-curated) {
  --mb-layout-width: 1280px;
  --mb-layout-gutter: 24px;
  --mb-layout-rail: max(var(--mb-layout-gutter), calc((100vw - var(--mb-layout-width)) / 2));
  --mb-layout-h2: clamp(30px, 3.1vw, 44px);
  --mb-layout-body: 18px;
}
@media (min-width: 768px) { body:is(.mb-elementor-page, .mbpse-curated) { --mb-layout-gutter: 32px; } }
@media (min-width: 1024px) { body:is(.mb-elementor-page, .mbpse-curated) { --mb-layout-gutter: 48px; } }

/* Only established full-width page sections escape the legacy document container. */
.mb-elementor-page main :is(.mb-source-row, .mb-crew-moment).elementor-top-section {
  width: 100vw !important; max-width: none; left: 0 !important;
  margin-inline: calc(50% - 50vw) !important;
}
.mb-elementor-page main :is(.mb-source-row, .mb-penguin-header, .mb-brand-hero, .mb-portrait-split, .mb-crew-moment, .mb-portfolio, .mb-case).elementor-top-section { padding-inline: 0 !important; }
.mb-elementor-page main :is(.mb-source-row, .mb-penguin-header, .mb-brand-hero, .mb-portrait-split, .mb-crew-moment, .mb-portfolio, .mb-case).elementor-top-section > .elementor-container {
  width: calc(100% - var(--mb-layout-gutter) * 2) !important;
  max-width: var(--mb-layout-width) !important; margin-inline: auto;
}
.mb-elementor-page main .mb-source-row.elementor-top-section > .elementor-container > .elementor-column > .elementor-widget-wrap { padding-inline: 0; }
.mb-elementor-page main .mb-source-row.elementor-inner-section { width: 100%; margin-inline: 0; }
.mb-elementor-page main .mb-source-row.elementor-inner-section > .elementor-container { width: 100%; }
.mb-elementor-page main .mb-source-row.elementor-top-section:not(.mb-brand-hero):not(.mb-home-cta) { padding-block: 72px; }
.mb-elementor-page main .mb-source-row .mb-text-block { margin-bottom: 0; }
.mb-elementor-page main .mb-source-row .mb-text-block h2,
.mb-elementor-page main .mb-source-row .elementor-widget-heading h2 { font-size: var(--mb-layout-h2); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; margin-bottom: 24px; }
.mb-elementor-page main .mb-source-row .mb-text-block :is(p, li) { font-size: var(--mb-layout-body); line-height: 1.6; }
.mb-elementor-page main .mb-source-row .mb-text-block p { margin-top: 0; margin-bottom: 20px; max-width: 70ch; }
.mb-elementor-page main .mb-source-row .mb-text-block p:last-child { margin-bottom: 0; }
.mb-elementor-page main .mb-source-row .mb-text-block h3 { font-size: 22px; font-weight: 700; line-height: 1.25; margin: 28px 0 12px; }
.mb-elementor-page main .mb-source-row .mb-text-block h3:first-child { margin-top: 0; }
.mb-elementor-page main .mb-source-row.vc_row-has-fill + .mb-source-row > .elementor-container > .elementor-column > .elementor-widget-wrap { padding-top: 0; }
.mb-elementor-page main .mb-home-cta > .elementor-container > .elementor-column > .elementor-widget-wrap { max-width: none; margin-inline: 0; }
.mb-elementor-page main .mb-home-cta :is(h2, p) { max-width: 70ch; }
.mb-elementor-page main .mb-home-cta .cta-subtitle { margin-bottom: 28px; }
.mb-elementor-page main .mb-home-cta .mb-cta-alternative { margin-top: 20px; }
.mb-elementor-page main :is(.mb-portrait-split, .mb-crew-moment, .mb-portfolio, .mb-case) h2.elementor-heading-title { font-size: var(--mb-layout-h2); line-height: 1.12; letter-spacing: -.025em; }
.mb-elementor-page main .mb-crew-moment .mb-penguin-copy :is(h2, .elementor-heading-title) { font-size: var(--mb-layout-h2); line-height: 1.12; letter-spacing: -.025em; }
.mb-elementor-page main :is(.mb-brand-hero, .mb-penguin-header) h1 { text-align: left; }
.mb-elementor-page main .mb-contact-portrait-hero :is(h1, .intro-sub) { text-align: left; margin-inline: 0; }
.mb-elementor-page main .mb-portrait-split .mb-portrait-photo img { object-fit: contain; }
.mb-elementor-page main .mb-about-portrait > .elementor-container { align-items: flex-start; }
.mb-elementor-page main .mb-about-portrait .mb-portrait-photo img { max-height: 580px; }

/* Shared header rails and one navigation breakpoint. */
.mb-elementor-page .mbep-header-brand,
.mbpse-curated .mbps-sitebar { padding-inline: var(--mb-layout-rail); }
.mb-elementor-page .mbep-header-brand > .elementor-container { width: 100%; }
@media (min-width: 1024px) {
  body:is(.mb-elementor-page, .mbpse-curated) .mb-desktop-nav { left: var(--mb-layout-rail); }
}
@media (max-width: 1023px) {
  body.mb-elementor-page { --mb-header-height: 72px; }
  body.mbpse-curated { --mb-store-header-height: 72px; }
  .mb-elementor-page .mbep-header-brand .site-title .elementor-heading-title,
  .mbpse-curated .mbps-sitebar .mbps-logo { font-size: 28px; line-height: 1.1; letter-spacing: -1.5px; }
  body:is(.mb-elementor-page, .mbpse-curated) .hamburger { left: calc(var(--mb-layout-gutter) - 2px); width: 44px; height: 44px; min-width: 44px; min-height: 44px; box-sizing: border-box; }
  body:is(.mb-elementor-page, .mbpse-curated) .hamburger:not(.active) { padding: 8px 2px; }
  body:is(.mb-elementor-page, .mbpse-curated) .hamburger:not(.active) .line { height: 3px; margin-bottom: 8px; }
  body:is(.mb-elementor-page, .mbpse-curated) .hamburger:not(.active) .line:last-child { margin-bottom: 0; }
  body:is(.mb-elementor-page, .mbpse-curated) .hamburger__container { max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  body:is(.mb-elementor-page, .mbpse-curated) .hamburger__container ul a { display: inline-flex; align-items: center; min-height: 44px; }
  body:is(.mb-elementor-page, .mbpse-curated) .mb-desktop-nav { display: none; }
}

/* The service introduction and card outlines share the same outer edges. */
.mb-elementor-page main #diensten > .elementor-container { display: flex; flex-direction: column; }
.mb-elementor-page main #diensten > .elementor-container > .elementor-column { width: 100%; max-width: 100%; flex: 0 1 auto; }
.mb-elementor-page main #diensten > .elementor-container > .elementor-column > .elementor-widget-wrap { padding: 0; }
.mb-elementor-page #diensten .vc_custom_heading,
.mb-elementor-page #diensten .vc_custom_heading .elementor-heading-title { width: 100%; text-align: left; }
.mb-elementor-page #diensten .elementor-column:has(> .elementor-widget-wrap > .vc_custom_heading) { width: 100%; max-width: none; flex: 0 1 auto; }
.mb-elementor-page #diensten .elementor-column:has(> .elementor-widget-wrap > .vc_custom_heading) > .elementor-widget-wrap { padding-inline: 0; }
.mb-elementor-page #diensten .vc_custom_heading h2.elementor-heading-title { font-size: var(--mb-layout-h2); }
.mb-elementor-page #diensten .vc_custom_heading h2.elementor-heading-title b { text-align: left !important; }
.mb-elementor-page #diensten .mb-home-personal-intro { margin: 24px 0 0; max-width: 65ch; text-align: left; font-size: 19px; line-height: 1.6; }
.mb-elementor-page #diensten .bureau__services { margin: 32px 0 0; }
.mb-elementor-page #diensten .bureau__services > .elementor-container { display: grid; grid-template-columns: 1fr; gap: 24px; width: 100%; padding: 0; }
.mb-elementor-page #diensten .bureau__services > .elementor-container > .elementor-column { width: 100%; max-width: none; min-width: 0; padding: 0 !important; margin: 0; }
.mb-elementor-page #diensten .bureau__services .mb-service-card > .elementor-widget-wrap { padding: 0 24px 28px; }
.mb-elementor-page #diensten .bureau__services .mb-service-card .elementor-widget-heading { margin-bottom: 18px; min-height: 0; }
.mb-elementor-page #diensten .bureau__services .mb-service-card .elementor-heading-title { text-align: left; line-height: 1.3; min-height: 0; }
.mb-elementor-page #diensten .bureau__services .mb-service-card .mb-wp-text-body { margin: 0; font-size: 18px; line-height: 1.55; text-align: left; }
@media (min-width: 768px) { .mb-elementor-page #diensten .bureau__services > .elementor-container { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) {
  .mb-elementor-page #diensten .bureau__services > .elementor-container { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mb-elementor-page #diensten .bureau__services .mb-service-card .elementor-heading-title { min-height: 2.6em; }
}

/* Related service and process columns use real gaps instead of nested gutters. */
.mb-elementor-page main .mb-source-row:has(.service-col) > .elementor-container,
.mb-elementor-page main .mb-source-row:has(.process-step) > .elementor-container { gap: 28px; align-items: stretch; }
.mb-elementor-page main .mb-source-row:has(.service-col) > .elementor-container > .elementor-column,
.mb-elementor-page main .mb-source-row:has(.process-step) > .elementor-container > .elementor-column { flex: 1 1 0; width: 0; min-width: 0; }
.mb-elementor-page main :is(.service-col, .process-step) { text-align: left; }
.mb-elementor-page main .service-col { padding: 28px; }
.mb-elementor-page main .service-col :is(h3, p) { text-align: left; }
.mb-elementor-page main .process-step { padding: 0; }
.mb-elementor-page main .process-step .step-number { margin-inline: 0; }
.mb-elementor-page main .service-faq { max-width: 75ch; }
.mb-elementor-page main .service-faq h3 { margin-top: 28px; }
.mb-elementor-page main .service-faq h3:first-child { margin-top: 0; }

/* Projects retain their content order; headings, screenshots and rules align. */
.mb-elementor-page main .mb-project-row > .elementor-container { column-gap: 64px; }
.mb-elementor-page main .mb-project-visual { padding-inline: 0; }
.mb-elementor-page main .mb-project-plans { padding-block: 72px; }
.mb-elementor-page main .mb-case-detail > .elementor-container { gap: 48px; }
.mb-elementor-page main .mb-case-detail .elementor-widget-text-editor { max-width: 70ch; }
.mb-elementor-page main .mb-brand-reading { width: 100%; max-width: 900px; padding-inline: 0; }
.mb-elementor-page main .mb-brand-reading > .elementor-container { width: 100%; max-width: 760px; }

/* Contact channels are distinct rows on a phone and clear columns on desktop. */
.mb-elementor-page main .contact-info-section > .elementor-container { gap: 32px; }
.mb-elementor-page main .contact-info-section > .elementor-container > .elementor-column { flex: 1 1 0; width: 0; }
.mb-elementor-page main .contact-info-section :is(h4, p) { text-align: left; }
.mb-elementor-page main .contact-info-section .contact-block { padding: 0; text-align: left; }
.mb-elementor-page main .contact-info-section a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.mb-elementor-page main .contact-info-section .mb-text-block { margin: 0; }
.mb-elementor-page main .mb-contact-form-section > .elementor-container > .elementor-column > .elementor-widget-wrap { max-width: 960px; margin-inline: auto; }
.mb-elementor-page main .mb-lead-form-wrap { padding: 36px; }
.mb-elementor-page main .mb-lead-form-wrap h2 { font-size: var(--mb-layout-h2); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 24px; }
.mb-elementor-page main .mb-lead-form-intro { max-width: 65ch; }
.mb-elementor-page main .mb-lead-form :is(input:not([type="hidden"]), select, textarea) { font-size: 18px; min-height: 52px; }
.mb-elementor-page main .mb-form-grid { gap: 0 24px; }

/* Footer rules align with the body, with room below for the existing cookie control. */
.mb-elementor-page .mbep-footer { padding: 64px 0 0 !important; }
.mb-elementor-page .mbep-footer > .elementor-container { width: calc(100% - var(--mb-layout-gutter) * 2); max-width: var(--mb-layout-width); display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.mb-elementor-page .mbep-footer > .elementor-container > .elementor-column { width: 100%; margin: 0; }
.mb-elementor-page .mbep-footer .elementor-widget-wrap { padding-inline: 0 !important; }
.mb-elementor-page .mbep-footer .middle-footer-column li,
.mb-elementor-page .mbep-footer .right-footer-column li { margin: 0; }
.mb-elementor-page .mbep-footer :is(.middle-footer-column, .right-footer-column) a { display: inline-flex; min-height: 40px; align-items: center; font-size: 17px; line-height: 1.5; }
.mb-elementor-page .mbep-footer .mb-footer-contact-actions { list-style: none; margin: 0; padding: 0; }
.mb-elementor-page .mbep-footer .mb-footer-contact-actions li { margin: 0; }
.mb-elementor-page .mbep-footer .mb-footer-contact-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; line-height: 1.5; color: #fff !important; text-decoration: underline; text-underline-offset: 5px; }
.mb-elementor-page .mbep-footer-bottom { padding-inline: 0; }
.mb-elementor-page .mbep-footer-bottom .elementor-widget-container { align-items: center; }
.mb-elementor-page .mbep-footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
.mb-elementor-page .mbep-footer-bottom > .elementor-container { width: calc(100% - var(--mb-layout-gutter) * 2); max-width: var(--mb-layout-width) !important; margin-inline: auto; }

@media (min-width: 768px) and (max-width: 1023px) {
  .mb-elementor-page main .mb-source-row:has(.service-col) > .elementor-container,
  .mb-elementor-page main .mb-source-row:has(.process-step) > .elementor-container { flex-wrap: wrap; }
  .mb-elementor-page main .mb-source-row:has(.service-col) > .elementor-container > .elementor-column,
  .mb-elementor-page main .mb-source-row:has(.process-step) > .elementor-container > .elementor-column { flex: 0 0 calc((100% - 28px) / 2); width: calc((100% - 28px) / 2); max-width: none; }
  .mb-elementor-page main .mb-brand-hero--service .mb-brand-visual img { height: 320px; }
  .mb-elementor-page main .mb-penguin-header h1 { font-size: 60px; }
}

/* Phone composition: a readable single column rather than a compressed desktop. */
@media (max-width: 767px) {
  body:is(.mb-elementor-page, .mbpse-curated) { --mb-layout-body: 18px; --mb-layout-h2: clamp(28px, 7.4vw, 34px); }
  .mb-elementor-page main .mb-source-row.elementor-top-section:not(.mb-brand-hero):not(.mb-home-cta) { padding-block: 48px; }
  .mb-elementor-page main .mb-source-row .mb-text-block h2,
  .mb-elementor-page main .mb-source-row .elementor-widget-heading h2 { margin-bottom: 20px; }
  .mb-elementor-page main :is(.mb-brand-hero, .mb-penguin-header) h1 { font-size: clamp(34px, 10.5vw, 52px) !important; line-height: 1.06; max-width: 15ch; }
  .mb-elementor-page main .mb-brand-hero { padding-top: calc(var(--mb-header-height) + 32px) !important; }
  .mb-elementor-page main .mb-penguin-header { padding-top: calc(var(--mb-header-height) + 32px) !important; }
  .mb-elementor-page main .mb-penguin-header .mb-penguin-crew > .elementor-widget-wrap { --mb-crew-height: clamp(240px, 52vw, 300px); }
  .mb-elementor-page main .mb-brand-hero--service .mb-brand-visual img { height: 220px; }
  .mb-elementor-page main :is(.mb-brand-hero, .mb-penguin-header) :is(p, .intro-sub) { text-align: left; }
  .mb-elementor-page #diensten .mb-home-personal-intro { font-size: 18px; margin-top: 20px; }
  .mb-elementor-page #diensten .bureau__services { margin-top: 20px; }
  .mb-elementor-page #diensten .bureau__services .mb-service-card .elementor-widget-heading { padding-top: 24px; margin-bottom: 16px; }
  .mb-elementor-page #diensten .bureau__services .mb-service-card .elementor-heading-title { min-height: 0; }
  .mb-elementor-page main .mb-source-row:has(.service-col) > .elementor-container,
  .mb-elementor-page main .mb-source-row:has(.process-step) > .elementor-container { display: flex; flex-direction: column; gap: 24px; }
  .mb-elementor-page main .mb-source-row:has(.service-col) > .elementor-container > .elementor-column,
  .mb-elementor-page main .mb-source-row:has(.process-step) > .elementor-container > .elementor-column { flex: 0 1 auto; width: 100%; max-width: none; }
  .mb-elementor-page main .service-col { padding: 24px; }
  .mb-elementor-page main .process-step { text-align: left; padding: 0 0 24px; border-bottom: 1px solid #ddd; }
  .mb-elementor-page main .mb-project-row > .elementor-container { column-gap: 0; min-height: 0; }
  .mb-elementor-page main .mb-project-row { padding-block: 48px; }
  .mb-elementor-page main .mb-project-plans { padding-block: 48px; }
  .mb-elementor-page main .mb-plan-detail summary { font-size: 20px; padding-block: 22px; }
  .mb-elementor-page main .mb-case-detail > .elementor-container { gap: 20px; }
  .mb-elementor-page main .mb-case-detail + .mb-case-detail > .elementor-container { padding-top: 32px; }
  .mb-elementor-page main .contact-info-section > .elementor-container { flex-direction: column; gap: 0; }
  .mb-elementor-page main .contact-info-section > .elementor-container > .elementor-column { width: 100%; flex: 0 1 auto; }
  .mb-elementor-page main .contact-info-section .elementor-widget-wrap { padding-block: 16px !important; border-bottom: 1px solid #ddd; }
  .mb-elementor-page main .contact-info-section > .elementor-container > .elementor-column > .elementor-widget-wrap { padding: 16px 0 !important; }
  .mb-elementor-page main .contact-info-section h4 { margin-bottom: 4px; }
  .mb-elementor-page main .contact-info-section .mb-text-block p { margin: 0; }
  .mb-elementor-page main .mb-contact-portrait-hero .mb-contact-portrait-image img { height: 240px; }
  .mb-elementor-page main .mb-lead-form-wrap { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .mb-elementor-page main .mb-form-grid { grid-template-columns: 1fr; gap: 0; }
  .mb-elementor-page main :is(.mb-home-cta, .mb-brand-hero, .mb-contact-form-section, .cta-final) .cta-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 16px 20px; font-size: 16px; line-height: 1.4; letter-spacing: 0; }
  .mb-elementor-page main .mb-home-portrait .mb-portrait-photo img { max-height: 520px; }
  .mb-elementor-page main .mb-about-portrait .mb-portrait-photo img { max-height: 400px; }
  .mb-elementor-page main .mb-brand-reading { width: calc(100% - 18px); }
  .mb-elementor-page .mbep-footer { padding-top: 48px !important; }
  .mb-elementor-page .mbep-footer > .elementor-container { grid-template-columns: 1fr; gap: 32px; }
  .mb-elementor-page .mbep-footer :is(.middle-footer-column, .right-footer-column) ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .mb-elementor-page .mbep-footer :is(.middle-footer-column, .right-footer-column) a { min-height: 44px; }
  .mb-elementor-page .mbep-footer-bottom .elementor-widget-container { justify-content: flex-start; gap: 12px 24px; }
}

/* Curated store only. Appended after the shared responsive layout variables.
 * Native template order, links, commerce controls and head behavior stay intact. */
body.mbpse-curated {
  font-size: var(--mb-layout-body);
}

/* The hero, catalog and footer share the same outer rail at every width. */
body.mbpse-curated :is(.mbps-header, .mbps-product-hero) {
  min-height: 0;
  padding: calc(var(--mb-store-header-height) + 40px) var(--mb-layout-rail) 56px;
}
body.mbpse-curated :is(.mbps-hero-content, .mbps-product-hero-inner) {
  width: 100%;
  max-width: var(--mb-layout-width);
  min-width: 0;
  margin-inline: auto;
  padding-top: 0;
  gap: 20px;
}
body.mbpse-curated :is(.mbps-hero-content, .mbps-product-hero-inner) > h1 {
  max-width: 18ch;
  font-size: clamp(36px, 8.8vw, 48px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.035em;
  overflow-wrap: break-word;
  text-wrap: balance;
}
body.mbpse-curated :is(.mbps-header, .mbps-product-hero) .mbps-lead {
  max-width: 65ch;
  font-size: var(--mb-layout-body);
  line-height: 1.6;
}
body.mbpse-curated .mbps-actions {
  gap: 12px;
  align-items: stretch;
}
body.mbpse-curated .mbps-actions .mbps-button {
  width: 100%;
  margin-top: 0;
}
body.mbpse-curated .mbps-button {
  max-width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 13px 22px;
  font-size: 16px;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  overflow-wrap: break-word;
}
body.mbpse-curated .mbps-back {
  justify-self: start;
  min-height: 44px;
  margin-bottom: 0;
  padding-block: 10px;
  line-height: 1.4;
}
body.mbpse-curated .mbps-section {
  padding: 56px var(--mb-layout-rail);
}
body.mbpse-curated .mbps-section-inner {
  width: 100%;
  max-width: var(--mb-layout-width);
  min-width: 0;
  margin-inline: auto;
}
body.mbpse-curated .mbps-section-heading {
  max-width: 70ch;
  gap: 16px;
  margin-bottom: 28px;
}
body.mbpse-curated :is(.mbps-section-heading, .mbps-product-block) h2 {
  font-size: var(--mb-layout-h2);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.025em;
}
body.mbpse-curated .mbps-section-heading > p:not(.mbps-eyebrow) {
  max-width: 65ch;
  font-size: var(--mb-layout-body);
  line-height: 1.6;
}

/* Matching catalog tracks, card edges, baselines and action rows. */
body.mbpse-curated .mbps-wrap :is(.mbps-grid, .mbps-related-grid) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: none;
  gap: 24px;
  align-items: stretch;
}
body.mbpse-curated .mbps-card {
  --mb-store-card-pad: 24px;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 1fr auto;
  gap: 24px;
  padding: var(--mb-store-card-pad);
}
body.mbpse-curated .mbps-card > div:first-child {
  min-width: 0;
}
body.mbpse-curated .mbps-wrap .mbps-card h3 {
  min-height: 0;
  font-size: 24px;
  line-height: 1.2;
  text-wrap: balance;
  overflow-wrap: break-word;
}
body.mbpse-curated .mbps-card p,
body.mbpse-curated .mbps-premium span {
  font-size: var(--mb-layout-body);
  line-height: 1.6;
}
body.mbpse-curated .mbps-card-footer {
  margin: 0 calc(-1 * var(--mb-store-card-pad)) calc(-1 * var(--mb-store-card-pad));
  padding: 18px var(--mb-store-card-pad);
  gap: 16px;
}
body.mbpse-curated .mbps-card-actions {
  gap: 12px;
}
body.mbpse-curated .mbps-card-footer .mbps-button {
  min-width: 0;
  min-height: 48px;
  padding-inline: 12px;
}
body.mbpse-curated .mbps-related-card {
  min-width: 0;
  min-height: 0;
  align-content: start;
  gap: 12px;
  padding: 24px;
}
body.mbpse-curated .mbps-related-card strong {
  font-size: 22px;
  line-height: 1.22;
  overflow-wrap: break-word;
}
body.mbpse-curated .mbps-related-card small {
  font-size: 16px;
  line-height: 1.6;
}

/* A readable detail column and an inline purchase panel on narrow screens. */
body.mbpse-curated .mbps-product-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
body.mbpse-curated .mbps-product-main {
  min-width: 0;
  gap: 28px;
}
body.mbpse-curated .mbps-product-block {
  min-width: 0;
  gap: 16px;
  padding-bottom: 28px;
}
body.mbpse-curated .mbps-product-block:last-child {
  padding-bottom: 0;
}
body.mbpse-curated .mbps-product-block p {
  max-width: 68ch;
  font-size: var(--mb-layout-body);
  line-height: 1.65;
}
body.mbpse-curated .mbps-product-aside {
  position: static;
  min-width: 0;
  padding: 24px;
  gap: 20px;
}
body.mbpse-curated .mbps-product-aside p {
  font-size: var(--mb-layout-body);
  line-height: 1.6;
}

/* Existing archive/unlisted panels remain readable without a narrow-page rail. */
body.mbpse-curated .mbps-download-wrap {
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: calc(var(--mb-store-header-height) + 40px) var(--mb-layout-rail) 56px;
}
body.mbpse-curated .mbps-panel {
  width: 100%;
  max-width: 860px;
  margin: 0;
  padding: 24px;
  gap: 20px;
}
body.mbpse-curated .mbps-panel h1 {
  font-size: clamp(36px, 8.8vw, 48px);
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: break-word;
}
body.mbpse-curated .mbps-panel > p {
  max-width: 65ch;
  font-size: var(--mb-layout-body);
  line-height: 1.65;
}
body.mbpse-curated .mbps-panel > .mbps-button {
  justify-self: start;
  margin-top: 0;
}

/* Footer content lines up with the catalog. Bottom space clears fixed controls. */
body.mbpse-curated .mbpse-footer {
  padding: 56px var(--mb-layout-rail) max(96px, calc(72px + env(safe-area-inset-bottom, 0px)));
}
body.mbpse-curated .mbpse-footer-inner {
  width: 100%;
  max-width: var(--mb-layout-width);
  margin-inline: auto;
}
body.mbpse-curated .mbpse-footer-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
body.mbpse-curated .mbpse-footer-brand {
  grid-column: auto;
}
body.mbpse-curated .mbpse-footer-brand p {
  max-width: 36ch;
  margin-top: 16px;
  font-size: var(--mb-layout-body);
}
body.mbpse-curated .mbpse-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
}
body.mbpse-curated .mbpse-footer-contact {
  gap: 4px;
}
body.mbpse-curated .mbpse-footer .mb-footer-title {
  grid-column: 1 / -1;
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #d8d8d8;
}
body.mbpse-curated .mbpse-footer-brand .mbpse-footer-link { display: flex; width: fit-content; }
@media (max-width: 767px) {
  body.mbpse-curated .mbpse-footer-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}
body.mbpse-curated .mbpse-footer-bottom .mbpse-footer-link { font-size: 13px; }
body.mbpse-curated .mbpse-footer-link {
  min-height: 44px;
  padding-block: 9px;
  font-size: 17px;
  line-height: 1.5;
}
body.mbpse-curated .mbpse-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 32px;
  padding-top: 24px;
}

@media (min-width: 768px) {
  body.mbpse-curated :is(.mbps-header, .mbps-product-hero) {
    padding-block: calc(var(--mb-store-header-height) + 56px) 64px;
  }
  body.mbpse-curated :is(.mbps-hero-content, .mbps-product-hero-inner) {
    gap: 24px;
  }
  body.mbpse-curated :is(.mbps-hero-content, .mbps-product-hero-inner) > h1 {
    font-size: clamp(48px, 5.2vw, 76px);
  }
  body.mbpse-curated .mbps-actions .mbps-button {
    width: auto;
  }
  body.mbpse-curated .mbps-section {
    padding-block: 72px;
  }
  body.mbpse-curated .mbps-section-heading {
    margin-bottom: 36px;
  }
  body.mbpse-curated .mbps-wrap :is(.mbps-grid, .mbps-related-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.mbpse-curated .mbps-wrap .mbps-card h3 {
    min-height: 2.4em;
    font-size: 22px;
  }
  body.mbpse-curated .mbps-product-main {
    gap: 36px;
  }
  body.mbpse-curated .mbps-product-block {
    padding-bottom: 36px;
  }
  body.mbpse-curated .mbps-product-aside {
    padding: 28px;
  }
  body.mbpse-curated .mbps-download-wrap {
    padding-block: calc(var(--mb-store-header-height) + 56px) 72px;
  }
  body.mbpse-curated .mbps-panel {
    padding: 40px;
  }
  body.mbpse-curated .mbps-panel h1 {
    font-size: clamp(48px, 5.2vw, 64px);
  }
  body.mbpse-curated .mbpse-footer {
    padding-top: 72px;
  }
  body.mbpse-curated .mbpse-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 48px;
  }
  body.mbpse-curated .mbpse-footer-brand {
    grid-column: 1 / -1;
  }
  body.mbpse-curated .mbpse-footer-nav {
    grid-template-columns: minmax(0, 1fr);
  }
  body.mbpse-curated .mbpse-footer-bottom {
    margin-top: 48px;
  }
}

@media (min-width: 1024px) {
  body.mbpse-curated .mbps-product-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: clamp(40px, 5vw, 72px);
  }
  body.mbpse-curated .mbps-product-aside {
    position: sticky;
    top: calc(var(--mb-store-header-height) + 24px);
  }
  body.mbpse-curated .mbpse-footer-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr);
    column-gap: clamp(40px, 5vw, 72px);
  }
  body.mbpse-curated .mbpse-footer-brand {
    grid-column: auto;
  }
}

@media (min-width: 1280px) {
  body.mbpse-curated :is(.mbps-header, .mbps-product-hero) {
    padding-block: calc(var(--mb-store-header-height) + 64px) 72px;
  }
  body.mbpse-curated .mbps-section {
    padding-block: 80px;
  }
  body.mbpse-curated .mbps-wrap :is(.mbps-grid, .mbps-related-grid) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
body.mbpse-curated .mbps-wrap .mbps-grid:has(> .mbps-card:only-child) { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
body.mbpse-curated .mbps-wrap .mbps-grid > .mbps-card:only-child h3 { min-height: 0; }
@media (min-width: 768px) {
  body.mbpse-curated .mbps-wrap .mbps-grid:has(> .mbps-card:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  body.mbpse-curated .mbps-wrap .mbps-grid:has(> .mbps-card:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
