/* =============================================================================================
   Article content typography - ONE stylesheet for both places the article body is shown:
     - the article page:   <div class="tt-article-body" v-html="article.description">
     - the TinyMCE editor:  body_class "tt-article-body", content_css includes this file
   so what authors see while writing is what readers get. Keep everything scoped to
   .tt-article-body (the editor iframe's <body> has that class).
   ============================================================================================= */
.tt-article-body {
  color: #2b2f36;
  font-family: "Roboto", "Arial", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.tt-article-body p, .tt-article-body li { color: #2b2f36 !important; font-size: 17px !important; line-height: 1.75 !important; }
.tt-article-body p { margin: 0 0 1.1em; }
.tt-article-body h2, .tt-article-body h3, .tt-article-body h4 { color: #14171c; line-height: 1.3; margin: 1.6em 0 .6em; font-weight: 700; }
.tt-article-body h2 { font-size: 1.5em; }
.tt-article-body h3 { font-size: 1.3em; }
.tt-article-body h4 { font-size: 1.15em; }

/* Bold text stays inline, exactly as typed: "<strong>Kay Hilbert:</strong> answer…" keeps the name and
   the answer on one line, and a paragraph that is entirely bold (an interview question) is simply a bold
   line. (A previous rule made any lone <strong> a separate block, which split names from their answers.) */
.tt-article-body strong, .tt-article-body b { font-weight: 700; color: #14171c; }

.tt-article-body a { color: #0c4da2; text-decoration: underline; text-underline-offset: 2px; }

/* Text colour chosen in the editor always wins. TinyMCE writes it as <span style="color: …">, and
   depending on the selection the span lands outside or inside <strong>/<em>/<a>. Outside, the bold/link
   colours above used to override it, so colour showed only "sometimes". Formatting inside a coloured
   span now inherits the chosen colour (unless that element has its own colour). */
.tt-article-body span[style*="color"] :is(strong, b, em, i, u, s, a, sub, sup, span):not([style*="color"]) { color: inherit !important; }
.tt-article-body img { max-width: 100%; height: auto; border-radius: 8px; }
/* Images with captions, as TinyMCE writes them: <figure class="image align-center"><img><figcaption>.
   The editor's default frame (grey border/background) is removed so it looks like the article page. */
.tt-article-body figure { margin: 1.4em 0; }
.tt-article-body figure.image { display: table; border: 0; background: none; padding: 0; }
.tt-article-body figure.image img { display: block; }
.tt-article-body figure.align-center { margin-left: auto; margin-right: auto; }
/* The editor's align buttons sometimes write style="text-align: …" on the figure instead of the class;
   text-align can't move a table box, so map it to margins too. */
.tt-article-body figure.image[style*="text-align: center"] { margin-left: auto; margin-right: auto; }
.tt-article-body figure.image[style*="text-align: right"] { margin-left: auto; margin-right: 0; }
.tt-article-body figure.align-left { float: left; margin: .3em 1.2em .8em 0; }
.tt-article-body figure.align-right { float: right; margin: .3em 0 .8em 1.2em; }
.tt-article-body figcaption, .tt-article-body .wp-caption-text { font-size: 14px !important; line-height: 1.5; color: #5d6b6c !important; margin: 8px 0 0; }
.tt-article-body figure.image figcaption { display: table-caption; caption-side: bottom; text-align: center; }
@media (max-width: 575px) {
  .tt-article-body figure.align-left, .tt-article-body figure.align-right { float: none; margin: 1.4em auto; }
}
.tt-article-body blockquote { margin: 1.4em 0; padding: 12px 18px; border-left: 4px solid #0c4da2; background: #f4f7fb; border-radius: 0 8px 8px 0; font-style: italic; }
.tt-article-body ul, .tt-article-body ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.tt-article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.tt-article-body th, .tt-article-body td { border: 1px solid #dfe3ea; padding: 8px 10px; vertical-align: top; line-height: 1.5 !important; }
.tt-article-body th, .tt-article-body thead td { background: #f4f7fb; font-weight: 600; }
.tt-article-body td p, .tt-article-body th p { margin: 0 !important; font-size: inherit !important; line-height: 1.5 !important; }
.tt-article-body iframe, .tt-article-body video { max-width: 100%; }

@media (max-width: 767px) {
  .tt-article-body, .tt-article-body p, .tt-article-body li { font-size: 16px !important; }
  /* wide tables scroll sideways instead of squeezing every column to a few characters */
  .tt-article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 14px; white-space: normal; }
  .tt-article-body th, .tt-article-body td { min-width: 140px; }
  /* tables pasted from Word carry fixed widths/heights inline; let the scroller use the full width */
  .tt-article-body table { width: 100% !important; height: auto !important; margin-left: 0 !important; margin-right: 0 !important; }
  .tt-article-body tr, .tt-article-body th, .tt-article-body td { height: auto !important; }
}

/* Dark mode: on the site the class sits on <body> above the article; in the editor on the same <body> */
.skin-dark .tt-article-body, .skin-dark .tt-article-body p, .skin-dark .tt-article-body li,
.skin-dark.tt-article-body, .skin-dark.tt-article-body p, .skin-dark.tt-article-body li { color: #d9dde3 !important; }
.skin-dark .tt-article-body h2, .skin-dark .tt-article-body h3, .skin-dark .tt-article-body h4,
.skin-dark .tt-article-body strong, .skin-dark .tt-article-body b,
.skin-dark.tt-article-body h2, .skin-dark.tt-article-body h3, .skin-dark.tt-article-body h4,
.skin-dark.tt-article-body strong, .skin-dark.tt-article-body b { color: #f1f1f1; }
.skin-dark .tt-article-body a, .skin-dark.tt-article-body a { color: #8fb6ec; }
.skin-dark .tt-article-body blockquote, .skin-dark .tt-article-body th, .skin-dark .tt-article-body thead td,
.skin-dark.tt-article-body blockquote, .skin-dark.tt-article-body th, .skin-dark.tt-article-body thead td { background: #23262d; }
.skin-dark .tt-article-body th, .skin-dark .tt-article-body td,
.skin-dark.tt-article-body th, .skin-dark.tt-article-body td { border-color: #343943; }
