/* ================
  CMS rich-text content
  Styles for HTML authored in the TinyMCE editor and printed raw into a
  `.description` wrapper (blog articles, press releases, event pages).

  The editor renders its content inside an iframe that loads TinyMCE's own
  content.css, so what an author sees there comes partly from that stylesheet
  rather than from the markup they saved. The public pages never loaded those
  rules, so editor and front end disagreed. The rules below are TinyMCE 7's
  default content.css table rules, scoped to the rich-text wrapper, so a table
  renders on the site the way it looked while it was being written.
 ================ */

/* Bootstrap Reboot zeroes cell borders for every table on the page:

     tbody, td, tfoot, th, thead, tr { border-width: 0 }

   An author rule beats the presentational hint a browser derives from
   `<table border="1">`, so the table kept its own outer border while every
   internal divider disappeared — columns ran together with no rule between
   them. Re-stating the hint as author CSS restores the grid.

   The `:not([style*=border-*])` guards are TinyMCE's: a table that carries its
   own inline border styling opts out, and an inline border on a single cell
   still wins on its own. `border="0"` stays borderless. */
.description table[border]:not([border='0']):not([style*='border-width']) td,
.description table[border]:not([border='0']):not([style*='border-width']) th {
  border-width: 1px;
}

.description table[border]:not([border='0']):not([style*='border-style']) td,
.description table[border]:not([border='0']):not([style*='border-style']) th {
  border-style: solid;
}

.description table[border]:not([border='0']):not([style*='border-color']) td,
.description table[border]:not([border='0']):not([style*='border-color']) th {
  border-color: #ccc;
}

/* Without a `cellpadding` attribute cells fall back to the browser default of
   1px, which is what made two adjacent headings read as one run of text. */
.description table:not([cellpadding]) td,
.description table:not([cellpadding]) th {
  padding: 0.4rem;
}

.description table {
  border-collapse: collapse;
}
