@charset "UTF-8";

/*
 * 記事本文の見出しスタイルを定義する。
 */
/* 背景板と本体を別の層に描き、文字の後ろに配置する。 */
.entry-content h2 {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  max-width: calc(100% - 4.5px);
  margin-top: 72px;
  margin-bottom: 30px;
  padding: 0.6em 0.8em;
  background: #506b85;
  color: #fff;
  border: 0;
  box-shadow: none;
}

.entry-content h2::before,
.entry-content h2::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0;
  pointer-events: none;
}

.entry-content h2::before {
  z-index: -2;
  background: #9cafc0;
  transform: translate(7px, 7px);
}

.entry-content h2::after {
  z-index: -1;
  background: #506b85;
}

.entry-content h3 {
  color: #3e586f;
  font-size: 20px;
  line-height: 1.5;
  margin-top: 48px;
  margin-bottom: 22px;
  padding: 0.35em 0 0.35em 0.75em;
  border: 0;
  border-left: 4px solid #9cafc0;
  border-bottom: 1px solid #c7d2dc;
}

.entry-content h4 {
  position: relative;
  color: #3e586f;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 36px;
  margin-bottom: 18px;
  padding: 0 0 0.45em;
  border: 0;
  border-bottom: 1px solid #d6e0e8;
}

/* 下線の左端だけを短い太線で強調する。 */
.entry-content h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 2px;
  background: #9cafc0;
}

/* 小さい画面では文字サイズと外側余白を調整する。 */
@media screen and (max-width: 768px) {
  .entry-content h2 {
    font-size: 21px;
    line-height: 1.5;
    margin-top: 48px;
    margin-bottom: 24px;
  }

  .entry-content h3 {
    font-size: 19px;
    line-height: 1.6;
    margin-top: 36px;
    margin-bottom: 20px;
  }

  .entry-content h4 {
    margin-top: 28px;
    margin-bottom: 16px;
  }
}
