/* Scoped to BAMBUKER journal only */
body.bbjp-landing,body.bbjp-article{overflow-x:clip}
.bbjp-shell,.bbjp-shell *,.bbjp-article .entry-content,.bbjp-article .entry-content *{box-sizing:border-box}
.bbjp-shell{width:min(1440px,100%);max-width:100%;margin:0 auto;padding:0 clamp(16px,4vw,56px) 90px;color:#26231f}
.bbjp-hero{background:linear-gradient(110deg,rgba(19,23,21,.93),rgba(32,31,27,.75)),url('hero.webp') center/cover;min-height:410px;padding:clamp(44px,8vw,110px) clamp(24px,6vw,86px);color:#f9f7f1;border-radius:3px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.bbjp-eyebrow{font-size:11px;letter-spacing:.23em;font-weight:650;text-transform:uppercase;opacity:.72}
.bbjp-hero h1{color:inherit;font-size:clamp(35px,5.2vw,70px);line-height:1.08;max-width:780px;letter-spacing:-.04em;font-weight:450;margin:22px 0 15px}
.bbjp-hero p{font-size:clamp(15px,1.6vw,19px);line-height:1.65;max-width:580px;margin:0}
.bbjp-tags{display:flex;flex-wrap:wrap;gap:9px;margin-top:32px}.bbjp-tags span{font-size:12px;padding:9px 13px;border:1px solid #ffffff66;border-radius:30px}
.bbjp-heading{display:flex;justify-content:space-between;gap:24px;align-items:end;margin:76px 0 30px}.bbjp-heading h2{font-size:clamp(30px,3.4vw,48px);letter-spacing:-.035em;margin:12px 0 0;font-weight:450}.bbjp-heading>p{max-width:360px;color:#777;line-height:1.6}
.bbjp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px 22px;min-width:0}.bbjp-card{min-width:0;overflow:hidden}.bbjp-cover{display:block;aspect-ratio:1.48;background:#e7e2d8;overflow:hidden;text-decoration:none}.bbjp-cover img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s}.bbjp-cover:hover img{transform:scale(1.035)}.bbjp-placeholder{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;letter-spacing:.18em;color:#746f66}.bbjp-placeholder small{font-size:11px;margin-top:9px}.bbjp-cardbody{padding:19px 3px 0}.bbjp-date{font-size:11px;color:#958e85}.bbjp-card h3{font-size:clamp(19px,1.9vw,25px);line-height:1.28;letter-spacing:-.02em;margin:10px 0;font-weight:500}.bbjp-card h3 a,.bbjp-more{color:inherit;text-decoration:none}.bbjp-card p{font-size:14px;line-height:1.7;color:#777;margin:0 0 15px}.bbjp-more{font-size:13px;border-bottom:1px solid #a59b8b;padding-bottom:4px}.bbjp-more span{margin-left:9px}.bbjp-pagination ul{list-style:none;display:flex;gap:10px;justify-content:center;margin:40px 0;padding:0}.bbjp-pagination a,.bbjp-pagination span{display:block;padding:10px 14px;border:1px solid #ddd;color:#333;text-decoration:none}.bbjp-cta{background:#f2f0eb;padding:clamp(35px,5vw,76px);margin-top:75px}.bbjp-cta h2{font-size:clamp(30px,3vw,45px);font-weight:450;letter-spacing:-.03em}.bbjp-cta p{line-height:1.7}.bbjp-cta a{display:inline-block;margin-top:14px;padding:13px 22px;background:#252924;color:#fff;text-decoration:none}
/* Article: protect mobile content from fixed widths and theme containers */
body.bbjp-article .entry-content,body.bbjp-article .post-content,body.bbjp-article article,body.bbjp-article main,body.bbjp-article .site-main{max-width:100%;min-width:0}
body.bbjp-article .entry-content{width:min(100%,840px);margin-inline:auto;padding-inline:clamp(16px,3vw,28px);font-size:17px;line-height:1.85;overflow-wrap:anywhere}
body.bbjp-article .entry-content :is(img,video,iframe,figure,table){max-width:100%;height:auto}body.bbjp-article .entry-content iframe{aspect-ratio:16/9}body.bbjp-article .entry-content pre{max-width:100%;overflow-x:auto}body.bbjp-article .entry-content table{display:block;overflow-x:auto;width:max-content;max-width:100%}body.bbjp-article .entry-content :is(h2,h3){line-height:1.22;overflow-wrap:break-word}body.bbjp-article .entry-content p{line-height:1.8}
@media(max-width:900px){.bbjp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bbjp-heading{margin-top:55px}}
@media(max-width:640px){.bbjp-shell{padding:0 16px 90px}.bbjp-hero{min-height:365px;padding:48px 23px}.bbjp-hero h1{font-size:38px}.bbjp-tags{gap:7px;margin-top:25px}.bbjp-tags span{font-size:11px;padding:7px 9px}.bbjp-heading{display:block;margin:42px 0 22px}.bbjp-heading>p{font-size:14px}.bbjp-grid{grid-template-columns:minmax(0,1fr);gap:34px}.bbjp-cover{aspect-ratio:1.48}.bbjp-card h3{font-size:23px}.bbjp-cta{margin-top:50px;padding:30px 23px}body.bbjp-article .entry-content{width:100%;padding-inline:18px;font-size:16px}body.bbjp-article .entry-content :is(h1,h2,h3){max-width:100%;word-break:normal}body.bbjp-article .entry-content .wp-block-columns{display:block}}

/* 1.2.0: interactive topic links and stronger mobile width safety */
.bbjp-tags a{display:inline-flex;align-items:center;min-height:42px;color:#fff!important;text-decoration:none!important;font-size:13px;padding:9px 16px;border:1px solid rgba(255,255,255,.55);border-radius:40px;position:relative;z-index:2;transition:background .2s,border-color .2s}.bbjp-tags a:hover,.bbjp-tags a:focus-visible{background:#c4a174;color:#171815!important;border-color:#c4a174}.bbjp-all{text-align:right;margin:22px 0 0}.bbjp-all a{color:#3b352c;text-underline-offset:5px}.bbjp-card a{position:relative;z-index:1;pointer-events:auto}.bbjp-card a:focus-visible{outline:3px solid #a87e4c;outline-offset:3px}.bbjp-card{display:flex;flex-direction:column}.bbjp-cardbody{flex:1}.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content){min-width:0!important;max-width:100%!important}.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content) :is(img,figure,table,pre,video){max-width:100%!important}.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content) :is(p,h1,h2,h3,li){overflow-wrap:anywhere}@media(max-width:640px){.bbjp-tags a{min-height:40px;padding:8px 12px;font-size:12px}.bbjp-shell{width:100%;max-width:100vw}.bbjp-article .entry-content{padding-inline:16px!important}}

/* 1.3.0: screenshot-driven mobile and heading corrections, journal scope only */
body.bbjp-landing .bbjp-shell{isolation:isolate}
body.bbjp-landing .bbjp-hero{position:relative;z-index:1}
body.bbjp-landing .bbjp-tags{position:relative;z-index:5}
body.bbjp-landing .bbjp-tags a{pointer-events:auto!important;cursor:pointer;touch-action:manipulation}
body.bbjp-landing .bbjp-hero::before,body.bbjp-landing .bbjp-hero::after{pointer-events:none}
/* Existing theme page title is redundant with the journal hero */
body.bbjp-landing :is(.entry-header,.page-header) > :is(h1,.entry-title,.page-title),
body.bbjp-landing :is(main,.site-main) > :is(h1.page-title,h1.entry-title){display:none!important}
body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content) > h1:first-child{display:none}
body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content){width:100%!important;max-width:840px!important;margin-left:auto!important;margin-right:auto!important}
body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content) :is(.wp-block-group,.wp-block-columns,.wp-block-column,div,section,figure){min-width:0;max-width:100%}
body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content) :is(img,video,iframe,figure){max-width:100%!important;height:auto}
@media(max-width:767px){
 html:has(body.bbjp-article),html:has(body.bbjp-landing){overflow-x:clip}
 body.bbjp-article,body.bbjp-landing{width:100%;max-width:100%;overflow-x:clip!important}
 body.bbjp-article :is(main,.site-main,article,.post,.entry-content,.post-content,.wp-block-post-content){width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;margin-left:0!important;margin-right:0!important}
 body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content){padding-left:18px!important;padding-right:18px!important;overflow-wrap:anywhere}
 body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content) :is(h1,h2,h3,p,li,a){max-width:100%;overflow-wrap:anywhere}
 body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content) table{display:block;max-width:100%;overflow-x:auto}
 body.bbjp-landing .bbjp-shell{width:100%!important;max-width:100%!important;padding-inline:16px!important}
 body.bbjp-landing .bbjp-hero{min-width:0!important;max-width:100%!important}
}

/* 1.4.0: journal content starts at premium hero, not beneath an extra theme banner. */
body.bbjp-landing .bbjp-shell{margin-top:0!important}
body.bbjp-landing .bbjp-hero{margin-top:0!important}
body.bbjp-landing .bbjp-shell .bbjp-hero h1{display:block!important}


/* 1.5.0 — mobile article layout. The theme uses wider wrappers than the viewport.
   Keep overrides scoped to articles imported/managed by this plugin. */
@media screen and (max-width: 767px) {
  html:has(body.bbjp-article) { width:100%; max-width:100%; overflow-x:hidden; }
  body.bbjp-article { width:100%!important; min-width:0!important; max-width:100%!important; overflow-x:hidden!important; }
  body.bbjp-article :is(#page,#content,#primary,#main,.site,.site-content,.content-area,.site-main,.main-content,.content-wrapper,.container,.wrap,.site-container,.page-content,.article-container,.single-post,.single-article,.post,.type-article,.type-journal,article) {
    box-sizing:border-box!important; width:100%!important; max-width:100%!important; min-width:0!important;
    margin-left:0!important; margin-right:0!important;
  }
  body.bbjp-article :is(.entry-header,.post-header,.article-header,.article-hero,.post-hero,.entry-content,.post-content,.wp-block-post-content,.article-content,.post-body,.article-body,.toc,.table-of-contents,.contents,.article-toc,.article-lead,.lead) {
    box-sizing:border-box!important; width:100%!important; max-width:100%!important; min-width:0!important;
    margin-left:0!important; margin-right:0!important;
  }
  body.bbjp-article :is(.entry-header,.post-header,.article-header,.entry-content,.post-content,.wp-block-post-content,.article-content,.post-body,.article-body) {
    padding-left:16px!important; padding-right:16px!important;
  }
  body.bbjp-article :is(h1,h2,h3,h4,p,li,blockquote,a,figcaption) {
    box-sizing:border-box!important; max-width:100%!important; min-width:0!important;
    overflow-wrap:anywhere!important; word-wrap:break-word!important; white-space:normal!important;
  }
  body.bbjp-article h1 { font-size:clamp(30px,8vw,42px)!important; line-height:1.12!important; letter-spacing:-.025em!important; }
  body.bbjp-article h2 { font-size:clamp(24px,6vw,32px)!important; line-height:1.2!important; }
  body.bbjp-article :is(p,li) { font-size:clamp(15px,4vw,17px); line-height:1.65; }
  body.bbjp-article :is(.toc,.table-of-contents,.contents,.article-toc) :is(ul,ol,.toc-grid,.toc-list,.toc-items) {
    box-sizing:border-box!important; display:grid!important; grid-template-columns:minmax(0,1fr)!important;
    width:100%!important; max-width:100%!important; min-width:0!important; gap:10px!important;
    padding-left:0!important; margin-left:0!important;
  }
  body.bbjp-article :is(.toc,.table-of-contents,.contents,.article-toc) li { width:100%!important; max-width:100%!important; min-width:0!important; }
  body.bbjp-article :is(.toc,.table-of-contents,.contents,.article-toc) a { display:block; max-width:100%!important; white-space:normal!important; }
  body.bbjp-article :is(img,picture,figure,video,iframe,svg) { max-width:100%!important; height:auto; }
  body.bbjp-article :is(pre,table,.wp-block-table) { max-width:100%!important; overflow-x:auto!important; }
  body.bbjp-article :is(.wp-block-columns,.wp-block-group,.wp-block-column) { min-width:0!important; max-width:100%!important; }
}

/* 1.6.0: repair the source of mobile overflow rather than clipping text.
   Works with the theme's article template and untagged /article/ posts. */
@media (max-width: 767px) {
  body.bbjp-article { --bbjp-mobile-gutter: 18px; }
  body.bbjp-article :is(#page,#content,#primary,#main,.site,.site-content,.content-area,.site-main,.main-content,.content-wrapper,.container,.wrap,.site-container,.page-content,.article-container,.single-post,.single-article,.post,.type-article,.type-journal,article,.article-layout,.article-wrap,.article-inner,.article-main,.article-copy,.article-text,.article-section,.article-section__inner,.entry,.entry-inner,.entry-body,.content,.post-inner,.post-body,.post-content,.entry-content,.wp-block-post-content,.wp-block-group,.wp-block-columns,.wp-block-column,.row,.col,.grid,.grid-item) {
    min-width:0!important; max-width:100%!important; box-sizing:border-box!important;
  }
  body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content,.article-content,.article-body,.article-text,.article-copy,.article-main,.post-body) {
    width:100%!important; max-width:100%!important; min-width:0!important;
    padding-inline:var(--bbjp-mobile-gutter)!important;
    margin-inline:0!important; transform:none!important;
  }
  body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content,.article-content,.article-body,.article-text,.article-copy,.article-main,.post-body) > * {
    min-width:0!important; max-width:100%!important; box-sizing:border-box!important;
  }
  body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content,.article-content,.article-body,.article-text,.article-copy,.article-main,.post-body) :is(h1,h2,h3,h4,p,li,blockquote,figcaption) {
    width:auto!important; max-width:100%!important; min-width:0!important;
    white-space:normal!important; overflow-wrap:anywhere!important; word-break:normal!important;
    transform:none!important; float:none!important;
  }
  body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content,.article-content,.article-body,.article-text,.article-copy,.article-main,.post-body) :is(h2,h3) {
    font-size:clamp(25px,6.3vw,32px)!important; line-height:1.2!important;
  }
  body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content,.article-content,.article-body,.article-text,.article-copy,.article-main,.post-body) :is(p,li) {
    font-size:16px!important; line-height:1.75!important;
  }
  body.bbjp-article :is(.toc,.table-of-contents,.contents,.article-toc,.bbjp-toc,.toc-grid,.toc-items,.toc-list) {
    width:100%!important; max-width:100%!important; min-width:0!important;
    display:block!important; columns:1!important; grid-template-columns:minmax(0,1fr)!important;
    box-sizing:border-box!important;
  }
  body.bbjp-article :is(.toc,.table-of-contents,.contents,.article-toc,.bbjp-toc,.toc-grid,.toc-items,.toc-list) :is(a,li,div) {
    width:100%!important; max-width:100%!important; min-width:0!important; white-space:normal!important;
    overflow-wrap:anywhere!important; box-sizing:border-box!important;
  }
  body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content,.article-content,.article-body,.article-text,.article-copy,.article-main,.post-body) :is(img,picture,video,figure,iframe) {
    display:block; max-width:100%!important; height:auto!important;
  }
  body.bbjp-article :is(.entry-content,.post-content,.wp-block-post-content,.article-content,.article-body,.article-text,.article-copy,.article-main,.post-body) :is(table,pre) {
    max-width:100%!important; overflow-x:auto!important;
  }
}

/* 1.7.0 — FIX THE ACTUAL THEME TEMPLATE: single-lameli_article.php.
   The previous rules targeted .entry-content, but the theme uses .ld-editorial-content.
   Grid children need min-width:0; otherwise their intrinsic width overflows mobile. */
@media (max-width: 768px) {
  body.bbjp-article .ld-editorial-single,
  body.bbjp-article .ld-article-single,
  body.bbjp-article .ld-editorial-shell,
  body.bbjp-article .ld-article-header,
  body.bbjp-article .ld-article-layout,
  body.bbjp-article .ld-article-layout > article,
  body.bbjp-article .ld-article-layout > aside,
  body.bbjp-article .ld-editorial-content {
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:100%!important;
  }
  body.bbjp-article .ld-editorial-shell {width:calc(100% - 32px)!important;margin-inline:auto!important}
  body.bbjp-article .ld-article-header {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:22px!important}
  body.bbjp-article .ld-article-header > div {min-width:0!important;max-width:100%!important}
  body.bbjp-article .ld-article-header h1 {font-size:clamp(30px,8.5vw,42px)!important;line-height:1.1!important;overflow-wrap:anywhere!important;max-width:100%!important}
  body.bbjp-article .ld-article-header img {display:block;width:100%!important;max-width:100%!important;height:auto!important;aspect-ratio:16/9;object-fit:cover}
  body.bbjp-article .ld-article-layout {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:30px!important}
  body.bbjp-article .ld-article-layout .ld-editorial-content {width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:0!important;overflow-wrap:anywhere!important}
  body.bbjp-article .ld-editorial-content > * {max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  body.bbjp-article .ld-editorial-content :is(h1,h2,h3,h4,p,li,blockquote) {max-width:100%!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important}
  body.bbjp-article .ld-editorial-content h2 {font-size:clamp(27px,7.3vw,34px)!important;line-height:1.18!important;margin:32px 0 14px!important}
  body.bbjp-article .ld-editorial-content p {font-size:16px!important;line-height:1.7!important;margin:0 0 20px!important}
  body.bbjp-article .ld-article-layout aside {position:static!important;width:100%!important}
  body.bbjp-article .ld-article-layout aside nav {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;overflow:visible!important}
  body.bbjp-article .ld-article-layout aside nav a {display:block!important;flex:none!important;width:100%!important;max-width:100%!important;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important}
  body.bbjp-article .ld-editorial-content :is(img,video,iframe,figure) {max-width:100%!important;height:auto!important}
  body.bbjp-article .ld-editorial-content :is(table,pre) {display:block;max-width:100%!important;overflow-x:auto!important}
  body.bbjp-article .ld-editorial-cta {width:calc(100% - 32px)!important;box-sizing:border-box!important}
}
