h2 {
  border-bottom: 2px solid var(--border-color);
}

h3 {
  border-bottom: 2px dashed var(--border-color);
}

h4 {
  border-bottom: 2px dotted var(--border-color);
  width: fit-content;
}

/* 記事ヘッダー */

.post-header {
  margin-bottom: 10px;
}

ul.post-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.post-tags li {
  margin-right: 10px;
  margin-bottom: 10px;
}

.post-meta td {
  padding-right: 20px;
}

.post-meta td:first-child {
  white-space: nowrap;
}

/* 記事本文 */

.post-body h2,h3,h4,h5,h6 {
  display: block;
  padding-top: calc(10px + var(--navbar-height));
  margin-top: calc(-1 * (5px + var(--navbar-height)));
}

.post-body p {
  margin-top: 15px;
}

.post-body .toc-anchor {
  display: block;
  padding-top: calc(10px + var(--navbar-height));
  margin-top: calc(-1 * (10px + var(--navbar-height)));
}

.post-body table {
  margin-left: 30px;
  border-collapse: collapse;
}

.post-body table thead tr {
  border-bottom: 1px solid;
}

.post-body table thead th {
  text-align: center;
}

.post-body table td {
  text-align: center;
}

.post-body table th,td {
  padding: 5px 10px;
}


/* KaTeX */

.katex-display > .katex > .katex-html {
  text-align: left;
  padding-left: 40px;
  width: fit-content;
}

.katex-display > .katex > .katex-html > .tag {
  left: 0;
}

/* 普通のボックス */

.normal-box {
  margin: 10px 20px;
  padding: 8px 10px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  min-width: fit-content;
}

/* 詳細ボックス */

.details {
  display: block;
  border-left: 2px solid var(--border-color);
  margin-left: 5%;
  font-size: 85%;
  margin-top: 7px;
  margin-bottom: 7px;
  position: relative;
}

.details::before {
  border-top: 2px solid var(--border-color);
  content: '';
  position: absolute;
  width: 10px;
  top: 0;
  left: 0;
  z-index: 1;
}
.details::after {
  border-bottom: 2px solid var(--border-color);
  content: '';
  position: absolute;
  width: 10px;
  bottom: 0;
  left: 0;
  padding-bottom: 0px;
  transition: padding-bottom 0.4s ease-out;
}

.details .details-toggle {
  display: inline-block;
  padding: 5px 20px;
  background-color: #f0f0f0;
  cursor: pointer;
  position: relative;
}

.details .details-toggle:after {
  content: '\025B6';
  padding-left: 5px;
}

.details .details-toggle.details-active:after {
  content: '\025BC';
}

.details .details-content {
  display: block;
  overflow-y: hidden;
  padding-left: 20px;
  padding-top: 0;
  max-height: 0;
  transition: max-height 0.4s ease-out, padding-top 0.4s ease-out;
}
