/* ============================================================
   やさしく学ぶ統計学 ― 追加スタイル
   ============================================================ */

:root {
  --md-admonition-icon--definition: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 21.5c-1.35-.85-3.8-1.5-5.5-1.5-1.65 0-3.35.3-4.75 1.05-.1.05-.15.05-.25.05-.25 0-.5-.25-.5-.5V6c.6-.45 1.25-.75 2-1 1.11-.35 2.330-.5 3.5-.5 1.95 0 4.05.4 5.5 1.5 1.45-1.1 3.55-1.5 5.5-1.5 1.17 0 2.39.15 3.5.5.75.25 1.4.55 2 1v14.6c0 .25-.25.5-.5.5-.1 0-.15 0-.25-.05-1.4-.75-3.1-1.05-4.75-1.050-1.7 0-4.15.65-5.5 1.5M12 8v11.5c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5V7c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5"/></svg>');
  --md-admonition-icon--theorem: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 1 9 9l-8 3 8 3 3 8 3-8 8-3-8-3z"/></svg>');
  --md-admonition-icon--proof: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m14.06 9 .94.94L5.92 19H5v-.92zm3.6-6c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"/></svg>');
  --md-admonition-icon--exercise: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 3c3.88 0 7 3.14 7 7 0 2.8-1.630 5.19-4 6.31V21H9v-3H8c-1.11 0-2-.89-2-2v-3H4.5c-.42 0-.66-.5-.42-.81L6 9.66A7.003 7.003 0 0 1 13 3m-2.68 4.39h1.93c.01-.3.1-.53.28-.69a1 1 0 0 1 .66-.23c.31 0 .57.1.75.28.18.19.26.45.26.75 0 .32-.07.59-.23.82-.14.23-.35.43-.61.59-.51.34-.86.64-1.05.91-.2.26-.31.68-.31 1.18h2c0-.31.04-.56.13-.74.09-.19.26-.36.51-.52.45-.24.82-.53 1.11-.93s.44-.81.44-1.31c0-.76-.27-1.37-.81-1.82-.53-.45-1.26-.68-2.19-.68-.87 0-1.57.2-2.11.59-.52.41-.78.98-.77 1.77zM12 14h2v-2h-2z"/></svg>');
  --md-admonition-icon--point: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11h3v2h-3zM1 11h3v2H1zM13 1v3h-2V1zM4.92 3.5l2.13 2.14-1.42 1.41L3.5 4.93zm12.03 2.13 2.12-2.13 1.43 1.43-2.13 2.12zM12 6a6 6 0 0 1 6 6c0 2.22-1.21 4.16-3 5.2V19a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-1.8c-1.79-1.04-3-2.98-3-5.2a6 6 0 0 1 6-6m2 15v1a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-1zm-3-3h2v-2.13c1.73-.44 3-2.01 3-3.87a4 4 0 0 0-4-4 4 4 0 0 0-4 4c0 1.86 1.27 3.43 3 3.87z"/></svg>');
  --md-admonition-icon--demo: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 19a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1c0-.21-.07-.41-.18-.57L13 8.35V4h-2v4.35L5.18 18.43c-.11.16-.18.36-.18.57m1 3a3 3 0 0 1-3-3c0-.6.18-1.16.5-1.63L9 7.81V6a1 1 0 0 1-1-1V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1v1.81l5.5 9.56c.32.47.5 1.03.5 1.63a3 3 0 0 1-3 3zm7-6 1.34-1.34L16.27 18H7.730l2.66-4.61z"/></svg>');
}

/* ---------- 定義 ---------- */
.md-typeset .admonition.definition,
.md-typeset details.definition {
  border-color: #1baf7a;
}
.md-typeset .definition > .admonition-title,
.md-typeset .definition > summary {
  background-color: rgba(27, 175, 122, 0.1);
}
.md-typeset .definition > .admonition-title::before,
.md-typeset .definition > summary::before {
  background-color: #1baf7a;
  -webkit-mask-image: var(--md-admonition-icon--definition);
          mask-image: var(--md-admonition-icon--definition);
}

/* ---------- 定理 ---------- */
.md-typeset .admonition.theorem,
.md-typeset details.theorem {
  border-color: #6a5acd;
}
.md-typeset .theorem > .admonition-title,
.md-typeset .theorem > summary {
  background-color: rgba(106, 90, 205, 0.1);
}
.md-typeset .theorem > .admonition-title::before,
.md-typeset .theorem > summary::before {
  background-color: #6a5acd;
  -webkit-mask-image: var(--md-admonition-icon--theorem);
          mask-image: var(--md-admonition-icon--theorem);
}

/* ---------- 証明 ---------- */
.md-typeset .admonition.proof,
.md-typeset details.proof {
  border-color: #898781;
}
.md-typeset .proof > .admonition-title,
.md-typeset .proof > summary {
  background-color: rgba(137, 135, 129, 0.1);
}
.md-typeset .proof > .admonition-title::before,
.md-typeset .proof > summary::before {
  background-color: #898781;
  -webkit-mask-image: var(--md-admonition-icon--proof);
          mask-image: var(--md-admonition-icon--proof);
}
.md-typeset .proof > :last-child::after {
  content: "∎";
  float: right;
  color: var(--md-default-fg-color--light);
}

/* ---------- 練習問題 ---------- */
.md-typeset .admonition.exercise,
.md-typeset details.exercise {
  border-color: #eb6834;
}
.md-typeset .exercise > .admonition-title,
.md-typeset .exercise > summary {
  background-color: rgba(235, 104, 52, 0.1);
}
.md-typeset .exercise > .admonition-title::before,
.md-typeset .exercise > summary::before {
  background-color: #eb6834;
  -webkit-mask-image: var(--md-admonition-icon--exercise);
          mask-image: var(--md-admonition-icon--exercise);
}

/* ---------- ポイント ---------- */
.md-typeset .admonition.point,
.md-typeset details.point {
  border-color: #eda100;
}
.md-typeset .point > .admonition-title,
.md-typeset .point > summary {
  background-color: rgba(237, 161, 0, 0.12);
}
.md-typeset .point > .admonition-title::before,
.md-typeset .point > summary::before {
  background-color: #eda100;
  -webkit-mask-image: var(--md-admonition-icon--point);
          mask-image: var(--md-admonition-icon--point);
}

/* ---------- シミュレーション ---------- */
.md-typeset .admonition.demo,
.md-typeset details.demo {
  border-color: #2a78d6;
}
.md-typeset .demo > .admonition-title,
.md-typeset .demo > summary {
  background-color: rgba(42, 120, 214, 0.1);
}
.md-typeset .demo > .admonition-title::before,
.md-typeset .demo > summary::before {
  background-color: #2a78d6;
  -webkit-mask-image: var(--md-admonition-icon--demo);
          mask-image: var(--md-admonition-icon--demo);
}

/* ---------- 図 ---------- */
.md-typeset figure {
  margin: 1.6em auto;
  max-width: 100%;
}
.md-typeset figure img {
  border-radius: 8px;
  background: #fcfcfb;
  box-shadow: 0 0 0 1px rgba(11, 11, 11, 0.08);
}
[data-md-color-scheme="slate"] .md-typeset figure img {
  box-shadow: none;
}
.md-typeset figcaption {
  max-width: 40rem;
  margin: 0.6em auto 0;
  font-size: 0.72rem;
  color: var(--md-default-fg-color--light);
  font-style: normal;
}

/* ---------- 数式 ---------- */
.md-typeset .arithmatex {
  overflow-x: auto;
  overflow-y: hidden;
}
.md-typeset div.arithmatex {
  padding: 0.2em 0;
}

/* ---------- 表 ---------- */
.md-typeset table:not([class]) {
  font-size: 0.72rem;
}
.md-typeset table:not([class]) th {
  white-space: nowrap;
}

/* ---------- トップページのカード ---------- */
.md-typeset .grid.cards > ul > li {
  border-radius: 10px;
}
.chapter-meta {
  color: var(--md-default-fg-color--light);
  font-size: 0.75rem;
}

/* 見出しの行間（日本語向け） */
.md-typeset {
  line-height: 1.85;
}
.md-typeset h1 {
  font-weight: 700;
  margin-bottom: 0.8em;
}
.md-typeset h2 {
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  padding-bottom: 0.25em;
}
