/* REBOOSTLAB Precision 4.3.3 — WordPress plugin compatibility.
 * Source-compatible presentation for Inline Related Posts 3.11.x and TOC Plus.
 * Scope is limited to article HTML; no plugin algorithms or stored content altered.
 * The IRP plugin generates random `.u[hash]` classes and inline <style> rules:
 * selectors below match its semantic .ctaText / .postTitle structure instead.
 */
html[data-rb-theme="light"]{
  --rb-int-accent:#426175;
  --rb-int-link:#263f4d;
}
html[data-rb-theme="dark"]{
  --rb-int-accent:#91afd0;
  --rb-int-link:#d4e4ef;
}
html[data-rb-theme="green"]{
  --rb-int-accent:#92d45e;
  --rb-int-link:#e5f4ea;
}

/* Inline Related Posts. Plugin CSS is injected into <style> blocks with generated
 * selectors, therefore these deliberate scoped declarations use !important. */
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)){
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  border:1px solid var(--rb-press-line-strong)!important;
  border-left:3px solid var(--rb-int-accent)!important;
  border-radius:8px!important;
  background:var(--rb-press-soft)!important;
  box-shadow:none!important;
  color:var(--rb-press-ink)!important;
  opacity:1!important;
  text-align:left!important;
  text-decoration:none!important;
  font:500 13px/1.55 var(--rb-font-system)!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  white-space:normal!important;
  transition:background-color .16s,border-color .16s!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)):is(:hover,:focus-visible){
  background:var(--rb-press-panel)!important;
  border-color:var(--rb-int-accent)!important;
  border-left-color:var(--rb-int-accent)!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle))>div{
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
  padding:11px 13px!important;
  margin:0!important;
  text-align:left!important;
  line-height:1.6!important;
  color:var(--rb-press-ink)!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)) .ctaText{
  display:inline!important;
  color:var(--rb-int-accent)!important;
  background:none!important;
  font:800 10px/1.55 var(--rb-font-system)!important;
  letter-spacing:.055em!important;
  text-decoration:none!important;
  vertical-align:baseline!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)) .postTitle{
  color:var(--rb-press-ink)!important;
  font:650 13px/1.55 var(--rb-font-system)!important;
  text-decoration:none!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  letter-spacing:0!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)):is(:hover,:focus-visible) .postTitle{
  color:var(--rb-int-link)!important;
  text-decoration:underline!important;
  text-underline-offset:3px!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) .rb-irp-wrap{
  box-sizing:border-box!important;
  margin:15px 0!important;
  padding:0!important;
  min-width:0!important;
  max-width:100%!important;
  clear:both!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)):focus-visible{
  outline:2px solid var(--rb-int-accent)!important;
  outline-offset:3px!important;
}

/* Other IRP presentation templates can nest images and centered text panels.
 * Neutralize only fixed light surfaces; retain thumbnail backgrounds and content. */
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)) :is(.centered-text-area,.centered-text,.ctaButton,.postImageUrl){
  box-sizing:border-box!important;
  max-width:100%!important;
  color:var(--rb-press-ink)!important;
  background-color:transparent!important;
  box-shadow:none!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)) img{
  max-width:100%!important;
  height:auto!important;
}

/* Authored article outlines are distinct from the plugin. WordPress post_content
 * often includes <nav aria-label="Mục lục"> regardless of plugin activation. */
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"]{
  box-sizing:border-box!important;
  display:block;
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
  margin:19px 0!important;
  padding:14px 17px!important;
  border:1px solid var(--rb-press-line)!important;
  border-radius:9px!important;
  background:var(--rb-press-soft)!important;
  color:var(--rb-press-ink)!important;
  font:400 13px/1.55 var(--rb-font-system)!important;
  overflow-wrap:anywhere!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"]>p:first-child{
  margin:0 0 9px!important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:var(--rb-press-ink)!important;
  font:750 12px/1.45 var(--rb-font-system)!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"] :is(ol,ul){
  box-sizing:border-box!important;
  max-width:100%!important;
  margin:7px 0 0!important;
  padding-left:22px!important;
  list-style-position:outside!important;
  font:400 13px/1.6 var(--rb-font-system)!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"] li{
  font:inherit!important;
  margin:5px 0!important;
  padding:0!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"] a{
  color:var(--rb-int-link)!important;
  font:inherit!important;
  text-decoration:none!important;
  overflow-wrap:anywhere!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"] a:is(:hover,:focus-visible){
  color:var(--rb-int-accent)!important;text-decoration:underline!important;text-underline-offset:2px!important;
}

/* Table of Contents Plus 202609.x: its default white surface and link style
 * must never override dark/green appearance. The toggle and anchors remain live. */
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container{
  box-sizing:border-box!important;
  display:block;
  position:relative;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:18px 0!important;
  padding:14px 17px!important;
  border:1px solid var(--rb-press-line)!important;
  border-radius:9px!important;
  background:var(--rb-press-soft)!important;
  color:var(--rb-press-ink)!important;
  font:400 13px/1.55 var(--rb-font-system)!important;
  text-align:left!important;
  box-shadow:none!important;
  overflow-wrap:anywhere!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container :is(.toc_title,.toc_title strong){
  color:var(--rb-press-ink)!important;
  font:750 12px/1.5 var(--rb-font-system)!important;
  text-align:left!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container .toc_title{margin:0 0 10px!important;}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container :is(.toc_toggle,.toc_toggle a,.toc_brackets){
  color:var(--rb-int-accent)!important;
  font:600 11px/1.5 var(--rb-font-system)!important;
  text-decoration:none!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container :is(.toc_list,.toc_list ul,.toc_list ol){
  box-sizing:border-box!important;
  max-width:100%!important;
  margin:0!important;
  padding:0 0 0 17px!important;
  list-style:none!important;
  color:var(--rb-press-ink)!important;
  background:transparent!important;
  font:400 13px/1.6 var(--rb-font-system)!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container>.toc_list{
  max-height:460px;overflow-y:auto;overscroll-behavior:contain;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container .toc_list li{
  margin:5px 0!important;
  padding:0!important;
  border:0!important;
  font:inherit!important;
  line-height:1.5!important;
  color:var(--rb-press-ink)!important;
  background:transparent!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container .toc_list a{
  color:var(--rb-int-link)!important;
  background:transparent!important;
  font:inherit!important;
  text-decoration:none!important;
  overflow-wrap:anywhere!important;
  white-space:normal!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container .toc_list a:is(:hover,:focus-visible){
  color:var(--rb-int-accent)!important;text-decoration:underline!important;text-underline-offset:2px!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container .toc_number{
  color:var(--rb-int-accent)!important;font:600 12px/1.5 var(--rb-font-system)!important;
}
/* Do not force display for TOC+'s .toc_list: the plugin controls it when toggled. */

/* Editorial de-duplication. CSS :has protects against a JS-disabled client;
 * JS supplies a matching .rb-toc-duplicate-hidden class as a fallback. */
body.rb-press-theme.rb-toc-policy-auto :is(.rb-entry-content,.rb-article-content):has(nav[aria-label="Mục lục"]) #toc_container,
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container.rb-toc-duplicate-hidden{
  display:none!important;
}
body.rb-press-theme.rb-toc-policy-plugin :is(.rb-entry-content,.rb-article-content):has(#toc_container) nav[aria-label="Mục lục"],
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav.rb-toc-native-hidden{
  display:none!important;
}
body.rb-press-theme.rb-toc-policy-hide :is(.rb-entry-content,.rb-article-content) :is(#toc_container,nav[aria-label="Mục lục"]){
  display:none!important;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) .rb-manual-toc-toggle{
  display:none;
  flex:0 0 auto;
  padding:5px 9px;
  min-height:34px;
  border:1px solid var(--rb-press-line-strong);
  border-radius:6px;
  background:var(--rb-press-panel);
  color:var(--rb-int-link);
  font:650 11px/1.3 var(--rb-font-system);
  cursor:pointer;
}
body.rb-press-theme :is(.rb-entry-content,.rb-article-content) .rb-manual-toc-toggle:focus-visible{
  outline:2px solid var(--rb-int-accent);outline-offset:2px;
}
@media (max-width:760px){
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(#toc_container,nav[aria-label="Mục lục"]){
    padding:11px 12px!important;
    margin:13px 0!important;
    font-size:12px!important;
    line-height:1.48!important;
  }
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(#toc_container,nav[aria-label="Mục lục"]) :is(ol,ul,.toc_list){
    font-size:12px!important;
    line-height:1.5!important;
  }
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) #toc_container>.toc_list{max-height:340px;}
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"]>p:first-child{margin-bottom:0!important;}
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"]>p:first-child:has(+ :is(ol,ul)){margin-bottom:0!important;}
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"] .rb-manual-toc-toggle{display:inline-flex;align-items:center;justify-content:center;}
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) nav[aria-label="Mục lục"][data-rb-collapsed="true"] > :is(ol,ul){display:none!important;}
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle))>div{
    padding:10px 11px!important;
  }
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)) .postTitle{
    font-size:12px!important;
    line-height:1.55!important;
  }
}
@media (prefers-reduced-motion:reduce){
  body.rb-press-theme :is(.rb-entry-content,.rb-article-content) :is(a.rb-irp-card,a:has(.ctaText):has(.postTitle)){transition:none!important;}
}
