/* ================================================
   AI Post 全域樣式表（by Lin）
   適用範圍：
   1. WordPress 健康格式（#859 樣式）
   2. 單一品項分析輸出
   3. 自主摘要／一般報告文
   ------------------------------------------------
   統一純白背景、無灰條、圖片防外溢、模組化架構
   ================================================ */

/* --- 共用基礎樣式 --- */
/* ⬇️ 限定 article 僅作用於內容區與三種文章類別 */
.entry-content article,
.post-content article,
.health-post,
.single-item,
.summary-post {
  background:#fff;
  color:#222;
  font-family:"Noto Sans TC",system-ui,"PingFang TC","Microsoft JhengHei",sans-serif;
  line-height:1.8;
  max-width:860px;
  margin:0 auto;
  padding:0 12px;
  text-align:left;
}
h1,h2 {
  margin:0 0 .7rem;
  line-height:1.4;
  text-align:left;
}
h1 {
  font-size:1.8rem;
  font-weight:700;
  margin-top:1.2rem;
}
h2 {
  font-size:1.25rem;
  font-weight:700;
  margin-top:1.6rem;
}
p,ul,li,table {
  margin:.6rem 0;
  text-align:left;
}
ul {margin:.5rem 0 1rem 1.5rem;padding:0;}
li {margin:.3rem 0;}
hr {
  border:none;
  border-top:1px solid #ccc;
  margin:1.8rem 0;
}
.ok {color:#007944;font-weight:700;}
.em {color:#c00;font-weight:700;}
small {color:#666;}
table {
  width:100%;
  border-collapse:collapse;
  margin:.8rem 0 1.2rem;
  font-size:.95rem;
  text-align:left;
}
th,td {
  border:1px solid #ccc;
  padding:.65rem .75rem;
  vertical-align:top;
}
th {
  background:#f8f8f8;
  font-weight:600;
}

/* ⬇️ 限定圖片規則僅作用於內容區與三種文章類別 */
.entry-content img,
.entry-content figure img,
.entry-content .wp-caption img,
.health-post img,
.single-item img,
.summary-post img {
  max-width:100%;
  height:auto;
  display:block;
  float:none!important;
  margin:1rem 0!important;
}

/* ⬇️ 限定 .wp-block-image / .wp-caption 只在內容區生效 */
.entry-content .aligncenter,
.entry-content .wp-block-image,
.entry-content .wp-caption,
.health-post .aligncenter,
.health-post .wp-block-image,
.health-post .wp-caption,
.single-item .aligncenter,
.single-item .wp-block-image,
.single-item .wp-caption,
.summary-post .aligncenter,
.summary-post .wp-block-image,
.summary-post .wp-caption {
  float:none!important;
  text-align:left!important;
  margin:1rem 0!important;
}

/* ⬇️ 限定 figure / .wp-caption 只在內容區生效 */
.entry-content figure,
.health-post figure,
.single-item figure,
.summary-post figure {margin:1rem 0;text-align:left;}
.entry-content .wp-caption,
.health-post .wp-caption,
.single-item .wp-caption,
.summary-post .wp-caption {width:auto!important;text-align:left!important;}

/* --- 模組 A：健康格式（#859 樣式） --- */
.health-post table {
  border-collapse:collapse;
  width:100%;
  border:1px solid #ccc;
}
.health-post th,
.health-post td {
  border:1px solid #ccc;
  padding:.6rem .7rem;
  text-align:center;
}
.health-post th {
  background:#f8f8f8;
  font-weight:600;
}
.health-post hr {
  border:0;
  border-top:1px solid #ccc;
  margin:1.8rem 0;
}
.health-post img {
  margin:1rem 0;
}
.health-post .ok {color:#007944;}
.health-post .em {color:#c00;}

/* --- 模組 B：單一品項分析輸出 --- */
/* 取消自動前置圖示，避免雙圖示 */
.single-item h1::before,
.single-item h2::before,
.single-item h3::before {
  content:none !important;
}
.single-item .ok {color:#007944;}
.single-item .em {color:#c00;}
.single-item table th {
  background:#fafafa;
}

/* --- 模組 C：摘要／報告文 --- */
.summary-post h1 {
  font-size:1.6rem;
}
.summary-post h2 {
  font-size:1.15rem;
  color:#333;
}
.summary-post p {
  line-height:1.9;
}
.summary-post table th {
  background:#f0f0f0;
}
.summary-post hr {
  border:0;
  border-top:1px solid #ddd;
  margin:1.4rem 0;
}

/* --- 模組 D（保留給未來新增格式） --- */
/* .teaching-post { ... } */
/* .announcement-post { ... } */