.news-detail, .news-detail-view {
  a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color 0.3s var(--ease);

    @media (any-hover: hover) {
      &:hover {
        color: var(--color-main);
        transition: color 0.3s var(--ease);
      }
    }
  }

  hr {
    display: block;
    height: 1px;
    margin: 4rem 0;
    background: #ccc;
    border: none;
  }

  img {
    vertical-align: text-bottom;
  }

  strong {
    font-weight: 700;
  }

  em {
    font-style: italic;
  }

  u {
    text-decoration: underline;
  }

  s {
    text-decoration: line-through;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 700;
    line-height: 1.6;
  }

  h1:first-child,
  h2:first-child,
  h3:first-child,
  h4:first-child,
  h5:first-child,
  h6:first-child {
    margin-top: 0;
  }

  h2 {
    font-size: 2.2rem;
    @media (width < 768px) {
      font-size: 1.8rem;
    }
    &:not(:first-child) {
      margin-top: 40px;
      @media (width < 768px) {
        margin-top: 24px;
      }
    }
    + * {
      margin-top: 24px;
    }
  }

  h3 {
    font-size: 1.8rem;
    @media (width < 768px) {
      font-size: 1.6rem;
    }
    &:not(:first-child) {
      margin-top: 40px;
      @media (width < 768px) {
        margin-top: 24px;
      }
    }
    + * {
      margin-top: 24px;
    }
  }

  h4 {
    margin-bottom: 1.6rem;
    @media (width < 768px) {
      font-size: 1.6rem;
    }
    &:not(:first-child) {
      margin-top: 40px;
      @media (width < 768px) {
        margin-top: 24px;
      }
    }
    + * {
      margin-top: 24px;
    }
  }

  h5 {
    font-weight: 600;
    &:not(:first-child) {
      margin-top: 32px;
      @media (width < 768px) {
        margin-top: 24px;
      }
    }
    + * {
      margin-top: 16px;
    }
  }

  p,
  dl,
  ol,
  ul,
  blockquote,
  pre,
  table {
    margin-bottom: 3.2rem;
    line-height: 2;
    @media (width < 768px) {
      margin-bottom: 2.4rem;
    }
  }

  p:empty {
    display: none;
  }

  ul {
    margin-left: 1.6rem;
  }

  ol {
    list-style-type: decimal;
    margin-left: 1.6em;

    ol {
      list-style-type: lower-alpha;

      ol {
        list-style-type: lower-roman;

        ol {
          list-style-type: lower-greek;

          ol {
            list-style-type: decimal;

            ol {
              list-style-type: lower-alpha;
            }
          }
        }
      }
    }
  }

  ul {
    list-style-type: disc;

    ul {
      list-style-type: circle;

      ul {
        list-style-type: square;

        ul {
          list-style-type: circle;

          ul {
            list-style-type: disc;

            ul {
              list-style-type: circle;
            }
          }
        }
      }
    }
  }

  blockquote {
    position: relative;
    padding: 20px 30px;
    line-height: 2.1rem;
    border-left: 4px solid #eee;

    p {
      margin-bottom: 0;
      font-size: 1.4rem;
      line-height: 2.4rem;
    }

    @media (width < 768px) {
      padding: 1.4rem 1.8rem;

      p {
        font-size: 1.2rem;
        line-height: 2.2rem;
      }
    }
  }

  code,
  pre {
    font-size: 1.4rem;
    color: var(--color-bg);
    background-color: var(--color-black);
    -moz-osx-font-smoothing: auto;
    -webkit-font-smoothing: auto;

    @media (width < 768px) {
      padding: 1.3rem;
      font-size: 1.2rem;
    }
  }

  code {
    padding: 0.6rem 1.2rem;
    line-height: 1.2rem;
    vertical-align: baseline;
    border-radius: 4px;
  }

  pre {
    padding: 0.6rem 1.2rem;
    overflow: auto;
    overscroll-behavior-block: contain;
    border-radius: 4px;

    code {
      padding: 0;
      line-height: 1;
      background: none;
    }
  }

  figure {
    width: fit-content;
    margin: 4.8rem auto;
    text-align: center;

    @media (width < 768px) {
      margin: 0 auto 3.2rem;
    }

    img {
      display: block;
      margin: 0 auto;
    }

    &:first-child {
      margin-top: 0;
    }

    &:last-child {
      margin-bottom: 0;
    }
  }

  figcaption {
    padding: 20px 30px;
    font-size: 1.4rem;
    text-align: left;
    background: #ccc;
    border-radius: 0 0 16px 16px;

    @media (width < 768px) {
      padding: 10px 16px;
      font-size: 1.2rem;
    }
  }

  table {
    width: 100%;
    @media (width < 768px) {
      display: block;
      overflow-x: auto;
      white-space: nowrap;
      max-width: 100%;
      -webkit-overflow-scrolling: touch;
    }
    th {
      background: #eee;
    }
    pre {
      white-space: pre-wrap;
    }
  }

  th,
  td {
    padding: 1.2rem 2.4rem;
    line-height: 1.2;
    text-align: left;
    border-top: 1px solid var(--color-disabled);
    border-bottom: 1px solid var(--color-disabled);
    @media (768px <= width) {
      font-size: 1.4rem;
    }
    p {
      margin-bottom: 0;
    }
  }

  thead tr,
  tfoot tr {
    background-color: #999;
  }

  thead {
    th,
    td {
      padding: 0.7778rem;
      font-size: 1.4rem;

      code {
        background-color: #fff;
      }
    }
  }

  tfoot {
    th,
    td {
      padding: 0.7778rem;
      font-size: 1.4rem;

      code {
        background-color: #fff;
      }
    }
  }

  tbody tr {
    background-color: #fff;
  }


  .mb20 {
    display: block;
    margin-bottom: 20px;
  }

  .mb30 {
    display: block;
    margin-bottom: 30px;
  }

  .mb40 {
    display: block;
    margin-bottom: 40px;
  }

  .mt20 {
    display: block;
    margin-top: 20px;
  }

  .mt30 {
    display: block;
    margin-top: 30px;
  }

  .mt40 {
    display: block;
    margin-top: 40px;
  }

  p {
    span.highlight {
      background: linear-gradient(transparent 20%, var(--color-yellow) 60% 90%, transparent 90%);
    }

    span.textLarge {
      font-size: 2.4rem;
      font-weight: bold;

      @media (width < 768px) {
        font-size: 1.8rem;
      }
    }
  }
}

.externalLink {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.3s var(--ease);

  @media (any-hover: hover) {
    &:hover {
      color: var(--color-main);
      transition: color 0.3s var(--ease);
    }
  }

  &::after {
    position: relative;
    top: 2px;
    right: -3px;
    bottom: 0;
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 6px;
    content: "";
    background-image: url("/images/icon-external.webp");
    background-repeat: no-repeat;
    background-size: contain;
  }
}
