/* Conteúdo editorial: somente texto do editor de posts/CPTs; não altera hero ou cards. */
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) { min-width:0; overflow-wrap:break-word; }
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) h2 {
  position:relative; margin-block: clamp(32px,4vw,52px) 17px;
  padding: 9px 0 11px clamp(16px,2vw,24px);
  border-inline-start: 3px solid var(--pty-brand-fg,#80641c);
  border-block-end: 1px solid var(--pty-border,#ddd);
  color: var(--pty-band-title,var(--pty-text,#262626));
  font-weight: 600; line-height:1.25; text-wrap:balance;
  scroll-margin-top: var(--pty-content-anchor-offset, 130px);
}
/* H3 mantém o seu estilo original; estes ajustes só neutralizam overflow. */
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) :is(h3,h4) { scroll-margin-top:var(--pty-content-anchor-offset,130px); }
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) :is(p,li) { overflow-wrap:anywhere; }
/* Gutenberg: preserva legendas e permite deslizar tabelas com muitas colunas. */
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) :is(.wp-block-table,.pty-content-table-scroll) {
  display:block; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain;
  margin: 28px 0; border:1px solid var(--pty-border,#ddd);
  border-radius:14px; background:var(--pty-surface,#fff);
  -webkit-overflow-scrolling:touch;
}
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) table {
  width:100%; border-spacing:0; border-collapse:separate; font-size:.95em;
  line-height:1.5; background:var(--pty-surface,#fff); color:var(--pty-text,#262626);
}
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) :is(th,td) {
  padding:14px 16px; text-align:start; vertical-align:top;
  border:0; border-block-end:1px solid var(--pty-border,#ddd);
}
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) th {
  background:var(--pty-surface-strong,var(--pty-bg,#f7f7f7));
  color:var(--pty-text,#262626); font-weight:750;
}
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) tbody tr:nth-child(even) { background:color-mix(in srgb,var(--pty-brand-fg,#80641c) 3%, transparent); }
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) tbody tr:hover { background:color-mix(in srgb,var(--pty-brand-fg,#80641c) 7%, transparent); }
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) tbody tr:last-child :is(th,td) { border-block-end:0; }
body.single :is(.pty-sp-prose,.pty-ed-single__body,.pty-ed-term__body,.pty-prose,.entry-content) .wp-block-table figcaption { padding:12px 14px; color:var(--pty-text-muted,#555); }
@media(prefers-reduced-motion:reduce){ body.single .pty-content-table-scroll *,body.single .wp-block-table * { transition:none; } }

/* CPTs com layout comercial próprio: índice dentro APENAS da prosa longa.
   Não altera a navegação horizontal nem a sidebar de conversão dos imóveis. */
body.single .pty-rich-single-layout { min-width:0; max-width:100%; overflow-x:clip; }
body.single .pty-rich-single-layout--indexed {
  display:grid;
  grid-template-columns:minmax(0,220px) minmax(0,1fr);
  gap:clamp(22px,3vw,36px); align-items:start;
}
body.single .pty-rich-single-body { min-width:0; }
/* Mesmo índice despojado das políticas: nenhuma moldura ou fundo de cartão.
   Sticky, scrollspy e navegação dos CPTs permanecem independentes. */
body.single .pty-rich-single-toc {
  position: sticky;
  align-self: start;
  top: var(--pty-rich-index-top, 110px);
  min-width: 0;
  max-height: calc(100vh - var(--pty-rich-index-top, 110px) - 18px);
  max-height: calc(100dvh - var(--pty-rich-index-top, 110px) - 18px);
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.single .pty-rich-single-toc > p {
  display: block;
  margin: 0 0 14px;
  color: var(--pty-brand-fg, #80641c);
  font-size: max(.68em, var(--pty-font-min, 12px));
  line-height: 1.4;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .12em;
}
body.single .pty-rich-single-toc nav {
  min-width: 0;
  max-height: calc(100vh - var(--pty-rich-index-top, 110px) - 65px);
  max-height: calc(100dvh - var(--pty-rich-index-top, 110px) - 65px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
body.single .pty-rich-single-toc a {
  display: block;
  padding: 9px 0 9px 14px;
  border: 0;
  border-inline-start: 2px solid var(--pty-border, #ddd);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--pty-text-muted, #555);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
  text-decoration: none;
  overflow-wrap: break-word;
  transition: color .2s ease, border-color .2s ease;
}
body.single .pty-rich-single-toc a:is(:hover, .is-active, [aria-current="location"]) {
  color: var(--pty-text, #262626);
  border-inline-start-color: var(--pty-brand-fg, #80641c);
  background: transparent;
}
body.single .pty-rich-single-toc a:focus-visible {
  color: var(--pty-text, #262626);
  border-inline-start-color: var(--pty-brand-fg, #80641c);
  outline: 2px solid var(--pty-brand-fg, #80641c);
  outline-offset: 2px;
}
@media(max-width:1100px) {
  body.single .pty-rich-single-layout--indexed { display:block; }
  body.single .pty-rich-single-toc {
    position:static; max-height:none; margin-bottom:22px;
  }
  body.single .pty-rich-single-toc nav { max-height:none; overflow:visible; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); }
}
