/* corporate-league専用 */
.cl-details summary {
  list-style: none;
  cursor: pointer;
  outline: none;

  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* デフォルト矢印を消す */
.cl-details summary::-webkit-details-marker {
  display: none;
}
.cl-details summary::marker {
  display: none;
}

/* 自前の矢印 */
.cl-details summary::before {
  content: "▶";
  display: inline-block;
  flex-shrink: 0;
  width: 1em;
  margin-right: 0.4em;
  color: #ffe600;
  font-weight: 700;
  line-height: 1;
}

/* 開いたとき */
.cl-details[open] > summary::before {
  content: "▼";
}

.cl-details[open] summary {
  opacity: 0.95;
}

/* --------------------- */
/* algorithm-lectures専用 */
.aal-marker {
  display: none;
}

/* AAL 記事内の大見出し */
.aal-marker ~ h1 {
  margin-top: 2.4em;
  margin-bottom: 0.8em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #cbd5e1;
}

/* 記事冒頭の h1 には大きな上余白を付けない */
.aal-marker + h1 {
  margin-top: 0;
}

/* 中見出し以下は線を付けず、余白で階層を表す */
.aal-marker ~ h2 {
  margin-top: 2em;
  margin-bottom: 0.7em;
}

.aal-marker ~ h3 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

@media screen and (min-width: 768px) {
  div.mx-auto.max-w-3xl:has(.aal-marker) {
    box-sizing: border-box !important;
    width: min(960px, calc(100vw - 64px)) !important;
    max-width: none !important;
  }

  div.mt-4.max-w-2xl:has(> .aal-marker) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
  }
}

.aal-marker ~ p code,
.aal-marker ~ li code {
  padding: 0.1em 0.3em;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #f6f8fa;
  font-size: 0.92em;
}

/* AAL の目次では大見出しだけを表示する */
.aal-marker ~ ul.table-of-contents ul,
.aal-marker ~ .table-of-contents > ul > li > ul {
  display: none;
}