/* page-legacy-bk-polish.css — page bundle a84da6e3db9f7614 (52/326 rules, manifest bb108b1802769b86) */
/*
 * Legacy ACF block polish for old editorial blocks that still appear inside
 * posts and clinic pages. Scoped by template/body classes in functions.php.
 */
/* The 1060px width is the POST editorial rail. /contato/ sets its own full-rail
   width in page-contato.css, so exclude it here — otherwise this !important forces
   a fight that page-contato has to answer with its own !important. */
/* 2026-06-27: bk8 aligned to the shared 1180px card-rail (was 1060px centered,
   ~60px inside the rail -> visually misaligned vs bk1/jt blocks on posts). bk3
   keeps its narrower 1060px editorial width. Width-only; structure unchanged. */
/* 2026-09-21 grid fix F5: the one-column post variant only capped the row text at 78ch (x=161 inside the 958px row interior); title
   and description now take the text rail, centred in the symmetric interior (704 → x=288). The ::before numeral travels with the title. */
body:is(.page-id-4507, .page-id-11183, .page-id-4721, .page-id-7862, .page-id-9427) .entry-content > :is(.bk11, .bk22, .bk42, .bk43, .bk58, .bk64, .bk56) {
  box-sizing: border-box;
  width: min(1240px, calc(100vw - 48px)) !important;
  max-width: min(1240px, calc(100vw - 48px)) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  overflow: hidden;
}
body:is(.page-id-4507, .page-id-11183, .page-id-4721, .page-id-7862, .page-id-9427) .entry-content > .bk11 {
  width: min(980px, calc(100vw - 48px)) !important;
  max-width: min(980px, calc(100vw - 48px)) !important;
}
body .entry-content .bk7.w {
  box-sizing: border-box;
  /* 2026-06-27: was 1120px -> centered 30px inside the rail. Snap to card-rail. */
  width: min(1180px, calc(100vw - 40px)) !important;
  max-width: min(1180px, calc(100vw - 40px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}
body .entry-content .bk7 .w-1110 {
  width: 100%;
  max-width: 100%;
}
body .entry-content .bk7 .b7-rows {
  border-top: 1px solid #d8cec6;
  border-bottom: 1px solid #d8cec6;
  background: #fbf8f4;
}
body .entry-content .bk7 .b7-rows::before,
body .entry-content .bk7 .b7-rows::after {
  content: none !important;
  display: none !important;
}
body .entry-content .bk7 .b7-row:not(:where(.jt-reading-chapter)) {
  container-type: inline-size;
  padding: clamp(34px, 4.4vw, 58px) clamp(22px, 5vw, 64px) !important;
  border-top: 1px solid #d8cec6;
  background: #fbf8f4 !important;
}
body .entry-content .bk7 .b7-row:first-child {
  border-top: 0;
}
/* 2026-10-20: stacked article sections share the surrounding prose rail.
   Media-break layouts retain their own grid. Narrow cards use their own width. */
@media (min-width: 768px){
body.single-post .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row > :is(h2,h3,h4,p,ul,ol) {
    box-sizing: border-box !important;
    width: min(var(--jt-ship-text-rail, 704px), 100%) !important;
    max-width: min(var(--jt-ship-text-rail, 704px), 100%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row:has(> h2),
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row:has(> h3) {
  display: block;
}
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row > h2:first-child,
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row > h3:first-child {
  max-width: 42ch;
  margin: 0 0 12px;
  padding-top: 3px;
  color: #211b18;
  font-family: Roobert, Arial, Helvetica, sans-serif;
  font-size: clamp(18px, 1.55vw, 24px);
  font-weight: 700;
  line-height: 1.14;
  text-wrap: balance;
}
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row > h2:first-child span,
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row > h3:first-child span {
  font-weight: inherit !important;
}
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row:has(> h2) > :not(h2):not(h3),
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row:has(> h3) > :not(h2):not(h3) {
  width: auto;
  max-width: 76ch;
}
body .entry-content .bk7 p,
body .entry-content .bk7 li {
  color: #403934;
  font-size: 16px;
  line-height: 1.72;
}
body .entry-content .bk7 p {
  margin-top: 0;
}
body .entry-content .bk7 p:last-child,
body .entry-content .bk7 ul:last-child,
body .entry-content .bk7 ol:last-child {
  margin-bottom: 0;
}
body .entry-content .bk7 p + p,
body .entry-content .bk7 p + ul,
body .entry-content .bk7 p + ol {
  margin-top: 0.85em;
}
body .entry-content .bk7.b7-ext .b7-row::after {
  content: none !important;
}
@media only screen and (min-width: 1024px){
body.single-post .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)):not(:where(.jt-reading-chapters)):has(.b7-row:nth-child(5)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 1px solid #d8cec6;
  }
body.single-post .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)):not(:where(.jt-reading-chapters)):has(.b7-row:nth-child(5))::before,
  body.single-post .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)):not(:where(.jt-reading-chapters)):has(.b7-row:nth-child(5))::after {
    content: none !important;
    display: none !important;
  }
body.single-post .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)):not(:where(.jt-reading-chapters)):has(.b7-row:nth-child(5)) .b7-row {
    border-top: 0;
    border-right: 1px solid #d8cec6;
    border-bottom: 1px solid #d8cec6;
  }
/* 2026-09-21 grid fix F6 (2-column grid only): the tile's clamp(22px,5vw,64px) side padding ate 22% of each 590px cell (text at
     115/705); 20px lateral = the .jt-up15__item inset on the same pages → 71/661. One-column bk7 (fewer than 5 rows) is untouched. */
body.single-post .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)):not(:where(.jt-reading-chapters)):has(.b7-row:nth-child(5)) .b7-row {
    padding-inline: 20px !important;
  }
/* 2026-09-18: an odd row count left an empty bordered cell in the last grid row — the last odd row spans both tracks */
body.single-post .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)):not(:where(.jt-reading-chapters)):has(.b7-row:nth-child(5)) .b7-row:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
body .entry-content .bk7 h2,
body .entry-content .bk7 h3 {
  max-width: 780px;
  text-wrap: balance;
}
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7.w {
  width: min(1180px, calc(100vw - 40px)) !important;
  max-width: min(1180px, calc(100vw - 40px)) !important;
}
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 .b7-rows:not(:where(.jt-reading-chapters)) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #d8cec6;
  border-left: 1px solid #d8cec6;
  background: #fbf8f4;
}
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 .b7-row:not(:where(.jt-reading-chapter)) {
  min-width: 0;
  border-right: 1px solid #d8cec6;
  border-bottom: 1px solid #d8cec6;
  padding: clamp(23px, 3vw, 38px) !important;
  background: #fbf8f4 !important;
}
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 .b7-row:not(:where(.jt-reading-chapter)):has(.jt-bk7-media-break--oldblock) {
  grid-column: 1 / -1;
  padding: 0 !important;
  background: #242329 !important;
}
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 h3:not(:where(.jt-reading-chapter h3)) {
  margin: 0 0 12px;
  color: #211b18;
  font-family: Roobert, Arial, Helvetica, sans-serif;
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 700;
  line-height: 1.14;
  text-wrap: balance;
}
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 h3:not(:where(.jt-reading-chapter h3)) span {
  font-weight: 700 !important;
}
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 p:not(:where(.jt-reading-chapter p)) {
  margin: 0;
  color: #3a342f;
  font-size: 15.5px;
  line-height: 1.62;
}
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 p:not(:where(.jt-reading-chapter p)) + p {
  margin-top: 0.8em;
}
@media only screen and (max-width: 980px){
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 .b7-rows:not(:where(.jt-reading-chapters)) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media only screen and (max-width: 640px){
body.single-post .entry-content .bk0.w,
  body .entry-content .bk7.w,
  body.single-post .entry-content .bk5.w {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
  }
body .entry-content .bk7 .b7-row:not(:where(.jt-reading-chapter)) {
    padding: 24px 20px !important;
  }
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row:has(> h2),
  body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row:has(> h3) {
    display: block;
  }
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row > h2:first-child,
  body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row > h3:first-child {
    max-width: 100%;
    margin-bottom: 10px;
    padding-top: 0;
    font-size: 20px;
    line-height: 1.14;
  }
body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row:has(> h2) > :not(h2):not(h3),
  body .entry-content .bk7 .b7-rows:not(:has(.jt-bk7-media-break)):not(:has(.jt-bk7-media-break--oldblock)) .b7-row:has(> h3) > :not(h2):not(h3) {
    max-width: none;
  }
body .entry-content .bk7 p:not(:where(.jt-reading-chapter p)),
  body .entry-content .bk7 li:not(:where(.jt-reading-chapter li)) {
    font-size: 15px;
    line-height: 1.6;
  }
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7.w {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
  }
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 .b7-row:not(:where(.jt-reading-chapter)) {
    padding: 22px 18px !important;
  }
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 h3:not(:where(.jt-reading-chapter h3)) {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.14;
  }
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 p:not(:where(.jt-reading-chapter p)) {
    font-size: 15px;
    line-height: 1.58;
  }
body:is(.postid-12513, .postid-14391, .postid-2961, .postid-11342, .postid-12969).single-post .entry-content .bk7 .b7-row:not(:where(.jt-reading-chapter)):has(.jt-bk7-media-break--oldblock) {
    padding: 0 !important;
  }
}
/* 2026-09-05 G3: bk3 was the last block on the retired 1060px ".w" editorial
   rail (bk5/bk7/bk8 left it on 2026-06-27). Rail it like the k6 readable card
   (760 text rail + 2×42px padding); its 72ch inner column already fits. */
