/* ============================================================
   術語對照表（Glossary Table）— 2026-11-30 新增
   ---------------------------------------------
   為什麼需要
   -----------
   GSC 實測：多個英文術語查詢停在排名 11-30 名
     「vats 醫學」        11.3 名（頁面內 VATS 僅出現 3 次，無對照呈現）
     「vats醫學中文」    13.3 名
     「ground glass nodule 中文」 10.4-12.5 名
     「wedge resection中文」/「segmentectomy中文」
     「nodule醫學中文」/「lung nodule 中文」/「solid nodule 中文」

   共通問題：這些頁面「有英文術語，但沒有中文對照」。
   讀者搜尋「X 中文」＝想確認這個英文詞在中文裡怎麼說。
   頁面沒有明確對照區塊 → Google 對這類查詢信心不足。

   設計原則
   --------
   1. 表格放在該術語第一次出現的段落之後（語意最相關處）
   2. 欄位：英文術語 | 中文對照 | 一句話說明（不過度簡化）
   3. 手機版可水平捲動（不擠壓、不溢出）
   4. 對比度符合 WCAG AA
   ============================================================ */

.term-table-wrap {
  margin: 1.75rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #dde3ee;
  border-radius: 8px;
  background: #ffffff;
}

/* ⚠️ WCAG 2.1.1：可水平捲動的區域必須能鍵盤聚焦，
   否則鍵盤/螢幕閱讀器使用者無法捲動它（axe: scrollable-region-focusable）
   tabindex="0" 由 HTML 端加上（純 CSS 無法設定 tabindex） */
.term-table-wrap:focus-visible {
  outline: 3px solid #1a2744;
  outline-offset: 2px;
}

.term-table-wrap table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.term-table-wrap caption {
  caption-side: top;
  text-align: left;
  padding: 0.85rem 1rem 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: #1a2744;
  background: #f8f9fc;
  border-bottom: 1px solid #e8eaf2;
}

.term-table-wrap th,
.term-table-wrap td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #eef1f6;
}

.term-table-wrap thead th {
  background: #f4f6fa;
  color: #1a2744;
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.9rem;
}

.term-table-wrap tbody tr:last-child th,
.term-table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.term-table-wrap tbody th {
  font-weight: 700;
  color: #1a2744;
  background: #fbfcfe;
  white-space: nowrap;
  font-family: "Noto Serif TC", Georgia, serif;
}

.term-table-wrap td {
  color: #344155;
}

.term-table-wrap .term-cn {
  color: #1a2744;
  font-weight: 700;
}

/* 表格下方註記 */
.term-table-note {
  margin: -1.25rem 0 1.75rem;
  font-size: 0.88rem;
  color: #5a6478;
  line-height: 1.7;
}

/* 手機版：縮小內距，避免過度橫向捲動 */
@media (max-width: 768px) {
  .term-table-wrap {
    margin: 1.5rem 0;
  }
  .term-table-wrap table {
    min-width: 400px;
    font-size: 0.9rem;
  }
  .term-table-wrap th,
  .term-table-wrap td {
    padding: 0.6rem 0.75rem;
  }
  .term-table-wrap caption {
    padding: 0.75rem 0.75rem 0.45rem;
    font-size: 0.95rem;
  }
}

/* 避免列印時被切斷 */
@media print {
  .term-table-wrap {
    overflow: visible;
    border: 1px solid #999;
  }
  .term-table-wrap table {
    min-width: 0;
    font-size: 10pt;
  }
}
