/* ナビゲーションリンク */
.chapter_navi {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 1.4285714286rem;
  gap: 0.4285714286rem;
}

.chapter_navi li {
  margin: 0;
  padding: 0;
  border: none;
}

.chapter_item-prev .nav__icon {
  scale: -1 1;
}

.chapter_navi li::before {
  content: none;
}

.chapter_navi a {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.7em 1.4em;
  font-weight: bold;
  justify-content: center;
  color: var(--main-color);
  background-color: var(--bg2-color);
  border: 0.0714285714rem solid var(--gray-color);
  border-radius: 0.3571428571rem;
  text-decoration: none;
  transition: opacity 0.3s ease 0s;
  transition: all 0.2s ease 0s;
  white-space: nowrap
}

html[data-theme=dark] .chapter_navi a {
  border: 0.0714285714rem solid #DEDEDE;
}

.chapter_navi a:hover {
  text-decoration: none;
}
@media (hover: hover) {
  .chapter_navi a:hover {
    opacity: 0.7;
    text-decoration: none;
  }
}
.chapter_navi a:active {
  opacity: 0.7;
  text-decoration: none;
}
@media all and (max-width: 740px) {
  .chapter_navi a {
    font-size: 0.8571428571rem;
  }
}
.chapter_navi a:hover {
  background-color: #EBEBEB;
}
html[data-theme=dark] .chapter_navi a:hover {
  background-color: #444;
}

.nav__icon {
  aspect-ratio: 1/1;
  color: var(--main-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav__icon svg {
  height: 0.7142857143rem;
  width: auto;
}

/* ページ内リンクメニュー - ボタン形式 */
.page_menu {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: strech;
  margin-bottom: 1.4285714286rem;
  gap: 0.4285714286rem;
}

.page_menu li {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  align-items: strech;
}

.page_menu li::before {
  content: none;
  display: none;
}

.page_menu a {
  display: inline-block;
  gap: 0.7em;
  padding: 0.7em 1.4em;
  font-weight: bold;
  justify-content: center;
  color: var(--main-color);
  background-color: var(--bg2-color);
  border: 0.0714285714rem solid var(--gray-color);
  border-radius: 0.3571428571rem;
  text-decoration: none;
  transition: opacity 0.3s ease 0s;
  transition: all 0.2s ease 0s;
}

html[data-theme=dark] .page_menu a {
  border: 0.0714285714rem solid #DEDEDE;
}

.page_menu a:hover {
  text-decoration: none;
}
@media (hover: hover) {
  .page_menu a:hover {
    opacity: 0.7;
    text-decoration: none;
  }
}
.page_menu a:active {
  opacity: 0.7;
  text-decoration: none;
}
@media all and (max-width: 740px) {
  .page_menu a {
    font-size: 0.8571428571rem;
  }
}
.page_menu a:hover {
  background-color: #EBEBEB;
}
html[data-theme=dark] .page_menu a:hover {
  background-color: #444;
}

.text-important{
  color:#BA2B00;
}

html[data-theme=dark] .text-important {
  filter: brightness(1.25);
}

.toc-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(1, auto);
  grid-auto-flow: column;
}

/* 画像関連 */
.w-600 {
  max-width: 600px;
  width: 100%;
}

.w-450 {
  max-width: 450px;
  width: 100%;
}

.w-300 {
  max-width: 300px;
  width: 100%;
}

/* レスポンシブ */
@media screen and (max-width: 768px) {
  .toc-content {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .chapter_navi {
    justify-content: space-between;
  }

  .chapter_navi li{
    flex: 1;
  }

  .chapter_item-prev {
    text-align: left;
  }

  .chapter_item-index {
    text-align: center;
  }

  .chapter_item-next {
    text-align: right;
  }
  
  .page_menu {
    display: grid;
    grid-template-columns: 1fr;
  }
  
  .page_menu li {
    display: grid;
  }
  
  .page_menu a {
    display: block;
  }
}

/* Table styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-responsive table {
  min-width: 650px;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1em;
  table-layout: fixed;
  background-color: var(--bg2-color);
}

table th, table td {
  padding: 8px 12px;
  text-align: left;
}

table th {
  background-color: var(--key-hover-color);
  font-weight: bold;
  border-bottom: 1px solid  var(--gray-color);
  border-top: 1px solid  var(--gray-color);
}

.term-table table th {
  background-color: var(--key-hover-color);
  font-weight: bold;
  border: 1px solid  var(--gray-color);
}

table td {
  border-bottom: 1px solid  var(--gray-color);
  font-weight: normal;
  word-break: break-normal;
  overflow-wrap: break-word;
}

.term-table table td {
  border: 1px solid  var(--gray-color);
  font-weight:   normal;
  word-break: break-normal;
  overflow-wrap: break-word;
}

html[data-theme=dark] table,
html[data-theme=dark] .bg-box {
  filter: brightness(1.25);
}
