/* ============================================================
   incentive-spirometry 專用樣式（2026-11-12 新增）
   —— 儀器圖示 / 對照表 / 練習步驟 / FAQ
   ============================================================ */

/* ---- 文章內文版面 ----
   2026-11-13 補：新增文章時漏搬參考頁的 .article-body 版面規則，
   導致 .article-body 滿版（320px 螢幕上寬 320px、padding 0），
   ul 的 40px padding-left 把 <li> 推到 x=320 貼齊螢幕右緣，
   左右兩側沒有留白。其他文章頁（chest-tube-drainage / lung-nodule-postop）
   都有這條規則，值一致：max-width 720px、padding 左右 1.5rem。 */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* ---- 頁尾欄位標題 ----
   全站 styles-20261015.css 只定義了 .footer-col h4，
   各文章頁專屬 CSS 補上 .footer-col h3（本站既有慣例）。
   少了這條，頁尾「快速連結／資源／聯絡」會變成深色字壓在深藍底上
   （對比度 1.15:1，axe color-contrast 違規）。 */
.footer-col h3,
.footer-col h4 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; font-size: 0.82rem;
  font-weight: 700;
  color: #ccd2e0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

/* ---- 儀器示意圖 ---- */
.device-figure {
  margin: 2rem auto;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e8eaf2;
  border-radius: 10px;
  text-align: center;
  max-width: 560px;
}

.device-figure img {
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto 0.75rem;
}

.device-figure figcaption {
  font-size: 0.88rem;
  color: #5a6a8a;
  line-height: 1.7;
  text-align: left;
}

.device-figure figcaption strong {
  color: #1a2744;
}

/* ---- 三種工具對照表 ---- */
.compare-wrap {
  display: block;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  margin: 1.5rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e8c98b;
  border-radius: 8px;
  background: #fff;
}

.compare-wrap:focus-visible {
  outline: 3px solid #8a4a1f;
  outline-offset: 2px;
}

.compare-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.compare-wrap th {
  background: #8a4a1f;
  color: #fff;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.compare-wrap td {
  padding: 0.75rem;
  border: 1px solid #e8c98b;
  vertical-align: top;
  line-height: 1.7;
}

.compare-wrap tr:nth-child(even) td {
  background: #fdfaf4;
}

.compare-wrap td:first-child {
  font-weight: 600;
  color: #8a4a1f;
  white-space: nowrap;
}

.table-note {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: #5a6a8a;
  line-height: 1.7;
}

.table-note a {
  color: #6e3916;
  text-decoration: underline;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---- 練習步驟 ---- */
.steps {
  counter-reset: istep;
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

.steps > li {
  counter-increment: istep;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.steps > li::before {
  content: counter(istep);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #1a2744;
  color: #f5d77a;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps > li strong {
  color: #1a2744;
}

/* ---- 可見 FAQ ---- */
.faq {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #fdfaf4;
  border: 1px solid #e8c98b;
  border-radius: 8px;
}

.faq-item {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed #e8c98b;
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-item h3 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; color: #8a4a1f;
  font-size: 1.08rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.faq-item p {
  margin-bottom: 0;
  line-height: 1.8;
  font-size: 1rem;
}

/* ---- 安全警訊 ---- */
.safety-note {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: #fff8f0;
  border: 1px solid #f5d77a;
  border-radius: 10px;
}

.safety-note h3 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; color: #8e6e0b;
  margin-top: 0;
  font-size: 1.05rem;
}

.safety-note p {
  margin-bottom: 0;
  line-height: 1.8;
}

.safety-note ul {
  margin: 0.75rem 0 0;
  padding-left: 1.5rem;
  line-height: 1.8;
}

/* ---- 手機版字級微調 ---- */
@media (max-width: 720px) {
  .device-figure {
    padding: 1rem;
  }

  .device-figure figcaption {
    font-size: 0.85rem;
  }

  .compare-wrap table {
    min-width: 520px;
    font-size: 0.88rem;
  }

  .compare-wrap th,
  .compare-wrap td {
    padding: 0.6rem;
  }

  .faq {
    padding: 1.15rem;
  }

  .faq-item h3 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; font-size: 1rem;
  }

  .faq-item p {
    font-size: 0.97rem;
  }
}
