/* REBOOSTLAB Precision 4.3.6 — authored HTML surface contrast.
   Classic/HTML posts may specify a white/light background without a readable
   foreground.  Normalize the SURFACE instead of rewriting editorial content.
   The JavaScript marks arbitrary light inline background colors; the limited
   attribute selectors below also prevent a white-on-white flash before JS.
   Only the reading body is targeted; navigation, ads, widgets and Google UI
   are not touched. */
html:is([data-rb-theme="green"],[data-rb-theme="dark"]) body.rb-press-theme .rb-entry-content :is(
  .rb-authored-light-surface,
  [style*="background-color:#fff" i],
  [style*="background-color: #fff" i],
  [style*="background-color:#f4f6f8" i],
  [style*="background-color:#f2f2f2" i],
  [style*="background-color:#ffffff" i],
  [style*="background:#fff" i],
  [style*="background: #fff" i]
) {
  background-color:var(--rb-press-panel)!important;
  color:var(--rb-press-ink)!important;
  border-color:var(--rb-press-line)!important;
}
html[data-rb-theme="light"] body.rb-press-theme .rb-entry-content :is(
  .rb-authored-light-surface,
  [style*="background-color:#fff" i],
  [style*="background-color: #fff" i],
  [style*="background-color:#f4f6f8" i],
  [style*="background-color:#f2f2f2" i],
  [style*="background-color:#ffffff" i],
  [style*="background:#fff" i],
  [style*="background: #fff" i]
) {
  color:#202428!important;
}
/* Clear table boundaries on dark insets and keep white-table rows legible. */
html:is([data-rb-theme="green"],[data-rb-theme="dark"]) body.rb-press-theme .rb-entry-content :is(
  td.rb-authored-light-surface,
  th.rb-authored-light-surface,
  [style*="background-color:#fff" i],
  [style*="background-color: #fff" i],
  [style*="background-color:#f2f2f2" i]
):is(td,th) {
  border-color:var(--rb-press-line)!important;
}
/* Links in author-supplied light boxes must have good contrast in every mode. */
html[data-rb-theme="light"] body.rb-press-theme .rb-entry-content .rb-authored-light-surface a {
  color:#32641f!important;
  text-decoration-color:currentColor;
}
html:is([data-rb-theme="green"],[data-rb-theme="dark"]) body.rb-press-theme .rb-entry-content .rb-authored-light-surface a {
  color:var(--rb-press-accent)!important;
  text-decoration-color:currentColor;
}
/* Correct heading and paragraph inheritance in authored panels without
   overriding the documented theme typography or per-post content itself. */
html[data-rb-theme="light"] body.rb-press-theme .rb-entry-content .rb-authored-light-surface :is(h1,h2,h3,h4,h5,h6,p,li,td,th,strong):not([style*="background" i]) {
  color:inherit;
}
