/* Article and legal layouts from Leona's desktop and mobile artboards.
   Scope these rules to the original pages so shared navigation stays intact. */
:is(.brief-imprint, .brief-governance) .m-lhead p,
:is(.brief-imprint, .brief-governance) .m-lhead p + span { min-block-size: auto; }
.brief-hafs-footer > .wrap > :last-child { margin-top: 72px !important; }
.brief-hafs-footer .article-footer-cta a { color: #1e2851; }

@media (max-width: 760px) {
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) .dt-field { display: none !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) main [style*="radial-gradient(circle"] { background-image: none !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) main [style*="grid-template-columns: 220px minmax"],
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) main [style*="grid-template-columns: 160px minmax"] { grid-template-columns: minmax(0, 1fr) !important; row-gap: 4px !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) main [style*="grid-template-columns: repeat(4,"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) main [style*="grid-column: span 2"] { grid-column: auto !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) main [style*="background: #FFFFFF"][style*="border: 1px solid #DCDCDC"]:not(figure:has(blockquote)) { background: transparent !important; border: 0 !important; border-top: 1px solid #DCDCDC !important; padding-left: 0 !important; padding-right: 0 !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) main [style*="background: #FFFFFF"][style*="border-top: 3px"] { background: transparent !important; border-left: 0 !important; border-right: 0 !important; border-bottom: 0 !important; padding: 20px 0 !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) .article-toc { padding: 10px 16px !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) .article-toc a[href^="#"] { min-height: 36px; gap: 6px !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) .article-toc a > span { font-size: 11px !important; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) main > section { padding-top: 0 !important; padding-bottom: 48px !important; }
  .brief-hafs-case-study .article-body-grid { gap: 72px !important; }
  .brief-hafs-customer-story main > .article-mobile-toc + section { padding-top: 32px !important; }
  .brief-hafs-customer-story main > section.dark,
  .brief-hafs-customer-story main > section.dark + section { padding-top: 48px !important; }
  .brief-hafs-customer-story section.dark .wrap > div:first-child { margin-bottom: 24px !important; }
  .brief-hafs-customer-story section.dark .wrap > div:first-child > div { gap: 10px !important; }
  .brief-hafs-customer-story section.dark [style*="repeat(4,"] > div { padding: 18px 14px !important; gap: 6px !important; }
  .brief-hafs-customer-story section.dark [style*="repeat(4,"] > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.16); }
  .brief-hafs-customer-story section.dark [style*="repeat(4,"] > div > span:first-child { font-size: 34px !important; }
  .brief-hafs-customer-story section.dark [style*="repeat(4,"] > div > span:nth-child(2) { font-size: 17px !important; }
  .brief-hafs-customer-story section.dark [style*="repeat(4,"] > div > span:nth-child(3) { font-size: 13px !important; line-height: 1.5 !important; }
}

/* Empty CMS media slots keep the approved artboard geometry until supplied. */
@media (min-width: 761px) {
  .brief-hafs-customer-story [data-article-media]:has(> img[src=""]) { display: flex !important; }
}
.brief-hafs-customer-story [data-article-media] > img[src=""] { display: none; }
@media (max-width: 760px) {
  .brief-hafs-customer-story [data-article-media][style*="height: 220px"]:has(> img[src=""]) {
    display: flex !important;
    height: auto !important;
    background-color: transparent !important;
    padding: 16px 0 0 !important;
  }
  .brief-hafs-customer-story [data-article-media][style*="height: 220px"]:has(> img[src=""]) > span:not([style*="position: absolute"]) { display: inline !important; }
}

@media (min-width: 761px) {
  .brief-hafs-customer-story main > section:first-of-type > .wrap > div:last-child { box-sizing: content-box; }
}
@media (max-width: 760px) {
  .brief-hafs-case-study main { display: flex; flex-direction: column; }
  .brief-hafs-case-study main > article,
  .brief-hafs-case-study .article-body-grid { display: contents !important; }
  .brief-hafs-case-study .article-hero { order: 0; }
  .brief-hafs-case-study .article-toc { order: 1; margin: 0; }
  .brief-hafs-case-study main > section { order: 2; padding-top: 32px !important; }
  .brief-hafs-case-study .article-body-grid > div { order: 3; margin: 0 16px 40px; }
  :is(.brief-hafs-case-study, .brief-hafs-customer-story) .article-toc a[href^="#"] { box-sizing: content-box; }
}

/* The same quote becomes the compact bordered testimonial in the mobile export. */
.article-story-voice, .article-story-author { display: contents; }
.article-story-avatar { display: none; }
@media (max-width: 760px) {
  .brief-hafs-customer-story .article-story-voice {
    display: block;
    margin: 0;
    padding: 32px;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-left: 3px solid #5a73d8;
  }
  .brief-hafs-customer-story .article-story-voice blockquote {
    font-size: 20px !important;
    line-height: 1.4 !important;
    letter-spacing: -.01em !important;
  }
  .brief-hafs-customer-story .article-story-voice blockquote span { color: inherit !important; }
  .brief-hafs-customer-story .article-story-voice figcaption {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 18px !important;
    border-color: #ebebeb !important;
  }
  .brief-hafs-customer-story .article-story-author { display: block; }
  .brief-hafs-customer-story .article-story-avatar { display: block; flex: 0 0 52px; width: 52px; height: 52px; background: #eef1fb; }
}
.brief-first-private-press-release footer > .wrap > :last-child,
.brief-press-release footer > .wrap > :last-child { margin-top: 72px !important; }
@media (min-width: 761px) {
  :is(.brief-first-private-press-release, .brief-press-release) main figure[style*="max-width: 720px"] { box-sizing: content-box; }
}
@media (max-width: 760px) {
  .brief-hafs-customer-story .article-quote-hero h1 + div > span:last-child { min-height: 30px; }
  .brief-hafs-customer-story .article-story-author { min-height: 53px; }
}
@media (max-width: 760px) {
  .draft-article.brief-hafs-customer-story [data-article-media][style*="height: 220px"]:has(> img[src=""]) { display: flex !important; }
}
@media (max-width: 760px) {
  :is(.brief-hafs-case-study, .brief-hafs-customer-story, .brief-first-private-press-release, .brief-press-release) footer > .wrap > :last-child { gap: 16px !important; }
}
:is(.brief-hafs-case-study, .brief-hafs-customer-story) .article-toc a { text-decoration: none; }
