/* Williams 15e Bible — bookdown gitbook custom CSS */

/* 中文字型優先 */
body {
  font-family: -apple-system, "PingFang TC", "Noto Sans TC",
    "Microsoft JhengHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif !important;
  font-size: 16px;
  line-height: 1.7;
}

/* 標題等級色彩階層 */
h1.title { color: #1a4d8c; }
h1 { color: #1a4d8c; border-bottom: 2px solid #1a4d8c; padding-bottom: 4px; }
h2 { color: #2a6dbe; border-bottom: 1px solid #cfd8dc; padding-bottom: 3px; margin-top: 1.6em; }
h3 { color: #3580c8; margin-top: 1.4em; }
h4 { color: #4a90c0; }

/* 內文 emphasis */
strong, b { color: #c0392b; font-weight: 600; }

/* Inline code（藥名 / 數字） */
code { color: #c7254e; background: #f9f2f4; padding: 2px 4px; border-radius: 3px; font-size: 93%; }

/* 表格 */
table {
  width: 100%;
  margin: 1em 0;
  border-collapse: collapse;
  font-size: 14px;
}
table th {
  background: #f0f4f8;
  color: #1a4d8c;
  font-weight: 600;
  padding: 8px 10px;
  border: 1px solid #cfd8dc;
  text-align: left;
}
table td {
  padding: 6px 10px;
  border: 1px solid #e0e6eb;
  vertical-align: top;
}
table tr:nth-child(even) td { background: #fafbfc; }

/* Blockquote — 章節定位段落 */
blockquote {
  border-left: 4px solid #2a6dbe;
  background: #f4f8fc;
  padding: 12px 16px;
  margin: 1em 0;
  color: #2c3e50;
  border-radius: 0 4px 4px 0;
}

/* 1-Page Summary 強調 */
h2:first-of-type {
  background: linear-gradient(90deg, #fff5e6 0%, #fafbfc 100%);
  padding: 8px 12px;
  border-left: 5px solid #f39c12;
}

/* 隨堂 MCQ + 章末 Self-test */
h3[id*="mcq"], h3[id*="MCQ"], h3[id*="q1"], h3[id*="q2"] {
  background: #e8f5e9;
  padding: 6px 10px;
  border-left: 3px solid #4caf50;
}

/* 必背數字總表 高亮 */
section.section h2[id*="必背數字"] {
  background: #fff3cd;
  border-left-color: #f39c12;
}

/* 8 Pearls / Cross-ref */
section.section h2[id*="pearls"], section.section h2[id*="Pearls"] {
  background: #ffe9d6;
  border-left-color: #d35400;
}

/* Print PDF style */
@media print {
  body { font-size: 11pt; }
  .book-summary { display: none; }
}

/* TOC sidebar */
.book-summary {
  font-size: 13px;
}
.book-summary ul.summary li.chapter > a {
  color: #2a6dbe;
}
.book-summary ul.summary li.chapter.active > a {
  background: #e3f2fd;
  color: #1a4d8c;
  font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 768px) {
  table { font-size: 12px; }
  body { font-size: 15px; }
}
