/* Article page additions: updated date, table of contents, author box. */

/* Anchors must not hide under the sticky header (110px desktop, 68px phone). */
.news_detail .description h2,
.news_detail .description h3 {
  scroll-margin-top: 130px;
}
@media (max-width: 767px) {
  .news_detail .description h2,
  .news_detail .description h3 {
    scroll-margin-top: 84px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.news_detail .clock .updated {
  margin-left: 12px;
  color: #666;
}

/* Table of contents */
.article-toc {
  clear: both;
  float: none; /* the menu stylesheet floats every <nav> to the left */
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fafafa;
}
.article-toc__title {
  color: #222;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.article-toc__list,
.article-toc__list ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-toc__list {
  margin-top: 10px;
  counter-reset: toc-section;
}
.article-toc__list > li {
  counter-increment: toc-section;
  counter-reset: toc-sub;
  margin: 0 0 6px;
  line-height: 1.5;
}
.article-toc__list > li::before {
  content: counter(toc-section) ". ";
  color: #d61510;
  font-weight: 700;
}
.article-toc__list ol {
  margin: 4px 0 4px 22px;
}
.article-toc__list ol > li {
  counter-increment: toc-sub;
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.5;
}
.article-toc__list ol > li::before {
  content: counter(toc-section) "." counter(toc-sub) " ";
  color: #999;
}
.article-toc a {
  color: #333;
}
.article-toc a:hover {
  color: #d61510;
}

/* Author box */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid #e5e5e5;
  border-left: 4px solid #fed700;
  border-radius: 6px;
  background: #fafafa;
}
.author-box__avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 8px;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}
.author-box__info {
  min-width: 0;
}
.author-box__info p {
  margin: 0;
}
.author-box__label {
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.author-box__name {
  color: #222;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.author-box__role {
  color: #d61510;
  font-size: 13px;
}
.author-box__bio {
  margin-top: 6px !important;
  color: #555;
  font-size: 14px;
  line-height: 1.55;
}

/* Tables created with the CMS editor: readable cells, and a wide table scrolls inside the article
   (see wrap_news_tables in ../js/detail.js) instead of widening the page on phones. */
.news_detail .description .table-scroll {
  max-width: 100%;
  margin: 0 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.news_detail .description table {
  max-width: 100%;
  border-collapse: collapse;
}
.news_detail .description .table-scroll > table {
  margin-bottom: 0;
}
.news_detail .description th,
.news_detail .description td {
  padding: 6px 10px;
  vertical-align: top;
}
.news_detail .description table[border] th,
.news_detail .description table[border] td {
  border: 1px solid #ccc;
}

/* Images with a caption: <figure><img><figcaption>. The figure shrinks to the image width so the caption
   never gets wider than the picture. */
.news_detail .description figure {
  display: table;
  max-width: 100%;
  margin: 0 auto 16px;
}
.news_detail .description figure > img,
.news_detail .description figure > a > img {
  display: block;
  margin: 0 auto;
}
.news_detail .description figure figcaption {
  display: table-caption;
  caption-side: bottom;
  padding: 8px 4px 0;
  color: #555;
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}
.news_detail .description figure[style*="float:left"],
.news_detail .description figure[style*="float: left"] {
  margin: 0 16px 12px 0;
}
.news_detail .description figure[style*="float:right"],
.news_detail .description figure[style*="float: right"] {
  margin: 0 0 12px 16px;
}
