/* ══════════════════════════════════════════════════════════════
   台灣 AEC 開源知識庫 — 站台樣式
   單一來源。docs/assets/site.css 由 scripts/build_site.py 複製產生，
   請改這一份，不要改 docs/ 底下的產物。

   色彩紀律：介面本身維持黑白灰（沿用原 landing page 的識別），
   顏色只用來標示資料狀態 —— 待台灣適配、待補欄位、尚無內容。
   ══════════════════════════════════════════════════════════════ */

:root {
  --ink: #1a1a1a;
  --ink-2: #444;
  --ink-3: #666;
  --muted: #888;
  --muted-2: #999;
  --line: #e8e8e8;
  --line-2: #f0f0f0;
  --surface: #f8f8f8;
  --bg: #fff;

  /* 資料狀態專用 — 只出現在知識庫與品質頁 */
  --ok: #2f7d5d;
  --ok-bg: #eaf4ef;
  --warn: #8a5a00;
  --warn-bg: #fdf3e2;
  --idle: #7a7a7a;
  --idle-bg: #f1f1f1;
  --draft: #4a5c8a;
  --draft-bg: #eef1f8;

  --radius: 8px;
  --radius-sm: 6px;
  --header-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
          "Microsoft JhengHei", sans-serif;
  --mono: "SF Mono", "Cascadia Code", "Noto Sans Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* 根字級固定 17px —— 之前窄視窗會掉回 16px，讓所有標題連帶縮小約 6%。 */
html { font-size: 17px; scroll-behavior: smooth; line-height: 1.6; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ═══ 版面容器 ═══ */
.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; width: 100%; }
.container-narrow { max-width: 760px; }
.container-wide { max-width: 1220px; }

/* ═══ HEADER ═══ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background .25s, border-color .25s;
}
.header-inner {
  max-width: 1220px; margin: 0 auto; padding: 0 24px;
  height: var(--header-h); display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.brand-mark {
  font-weight: 800; font-size: 0.75rem; letter-spacing: 0.1em;
  border: 1.5px solid currentColor; padding: 3px 7px; border-radius: 4px; line-height: 1;
}
.brand-text { font-weight: 700; font-size: 0.9375rem; letter-spacing: -0.01em; white-space: nowrap; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  text-decoration: none; font-size: 0.875rem; font-weight: 500; color: var(--ink-3);
  padding: 7px 13px; border-radius: var(--radius-sm); transition: background .18s, color .18s;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--line-2); color: var(--ink); }
.site-nav a.active { color: var(--ink); font-weight: 700; background: var(--line-2); }
.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.header-cta {
  text-decoration: none; font-size: 0.8125rem; font-weight: 600;
  background: var(--ink); color: #fff; padding: 8px 16px; border-radius: var(--radius-sm);
  transition: opacity .18s;
}
.header-cta:hover { opacity: 0.82; }

/* 深色 hero 之上的反白 header */
.site-header.over-dark {
  background: rgba(26, 26, 26, 0.72); border-bottom-color: rgba(255, 255, 255, 0.1);
}
.site-header.over-dark .brand,
.site-header.over-dark .site-nav a { color: rgba(255, 255, 255, 0.72); }
.site-header.over-dark .brand { color: #fff; }
.site-header.over-dark .site-nav a:hover,
.site-header.over-dark .site-nav a.active { background: rgba(255, 255, 255, 0.14); color: #fff; }
.site-header.over-dark .header-cta { background: #fff; color: var(--ink); }
.site-header.over-dark .nav-toggle span { background: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 4px; background: none; border: 0;
  cursor: pointer; padding: 8px; border-radius: var(--radius-sm);
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 站名是專案全名（24 字），比導覽摺疊的斷點更早就塞不下 nav 與 GitHub 鈕，
   所以文字先讓位、只留 AEC 標記，而不是等到 860px 才一起收。 */
@media (max-width: 1080px) {
  .brand-text { display: none; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  /* 靠右推開的 margin-left:auto 掛在 .site-nav 上，nav 一變成 fixed
     就脫離 flex 流、那個 auto 也跟著失效，GitHub 鈕與漢堡於是黏在
     品牌標右邊。改由 .header-actions 自己頂到右緣。 */
  .header-actions { margin-left: auto; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  }
  .site-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { color: var(--ink); padding: 12px 8px; border-radius: 0; border-bottom: 1px solid var(--line-2); font-size: 1rem; }
  .site-header.over-dark .site-nav a { color: var(--ink); }
}

/* ═══ 觸控目標 ═══
   量測結果：header 的 GitHub 鈕 38px、漢堡鈕 30px、篩選 chip 36px，
   都低於 44px 的可點擊建議值。用 pointer: coarse 只放大觸控裝置，
   桌機的密度不受影響。 */
@media (pointer: coarse) {
  .header-cta { min-height: 44px; display: inline-flex; align-items: center; }
  .nav-toggle { min-width: 44px; min-height: 44px; align-items: center; }
  .chip { min-height: 44px; padding: 10px 15px; }
  .kb-view-toggle button { min-height: 44px; }
  .kb-sort { min-height: 44px; }
  .kb-reset { min-height: 44px; padding: 10px 8px; }
  .site-nav a { min-height: 44px; display: flex; align-items: center; }
  .footer-col a { padding: 8px 0; }
  .kb-ai summary { min-height: 40px; }
  .kb-search input { padding: 14px 0; }
}

/* ═══ 排版 ═══ */
/* 標題一律固定尺寸，不隨視窗縮小 —— 之前用 clamp()，窄視窗時 h1 會掉到
   29.75px、h2 掉到 22.1px。h3 也從 18.06px 提到 21.25px，否則它跟
   .lead（18.06px）一樣大、只比內文（17px）大 1px，讀不出是標題。 */
h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.18; letter-spacing: -0.025em; }
h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.32; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.45; margin-bottom: 8px; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin-bottom: 16px; color: var(--ink-2); }
.lead { font-size: 1.0625rem; color: var(--ink-3); line-height: 1.75; }
.eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
strong { font-weight: 700; color: var(--ink); }
code {
  font-family: var(--mono); font-size: 0.875em; background: var(--line-2);
  padding: 2px 6px; border-radius: 4px; color: var(--ink);
}
.code-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.95;
  margin: 16px 0; overflow-x: auto;
}

/* ═══ 首頁：投影片式捲動（沿用 V1）═══
   只有首頁吃 scroll-snap。/why/ 的五千 px 長文與 /kb/ 的一萬 px 清單
   一旦加上 snap 會跟閱讀打架，所以用 html.home 把範圍鎖死。 */
html.home { scroll-snap-type: y mandatory; }

/* 全域 scroll-padding-top 是給錨點跳轉留的（header + 16px 呼吸空間），
   但 snapport 也吃這個值。首頁的 snap 落點只能讓開 header 本身，
   多出來的 16px 會在每段上緣露出前一段的底色，所以這裡收回去。
   同理，section 不能再掛 scroll-margin-top —— snapport 的 padding
   已經讓開 header 了，兩者相加會把整段往下推 136px。 */
html.home { scroll-padding-top: var(--header-h); }

body.home main > section {
  scroll-snap-align: start;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}
body.home main > section > .container { width: 100%; }

/* hero 用負 margin 鑽到 sticky header 底下（起點是 y=0 而非 y=60），
   所以它要的是整整一屏，不是 100vh - header。 */
body.home main > section.hero { min-height: 100vh; }

/* footer 不在 main 裡，沒有 snap-align 就不是 snap point；
   mandatory snap 會把捲到底的位置吸回最後一段，footer 因此看不到。 */
body.home .site-footer {
  scroll-snap-align: start;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}
body.home .site-footer > .container { width: 100%; }

/* 手機上 snap 容易卡住捲動，關掉 */
@media (max-width: 700px) {
  html.home { scroll-snap-type: none; scroll-padding-top: calc(var(--header-h) + 16px); }
  body.home main > section,
  body.home main > section.hero { min-height: 0; display: block; }
  body.home .site-footer { min-height: 0; display: block; }
}
/* 同上：不 gate。snap 本身不是動畫，只是捲動落點。 */

/* ═══ 側邊圓點導覽（沿用 V1，僅首頁）═══ */
.dot-nav {
  position: fixed; right: 24px; top: 50%; transform: translateY(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 14px; padding: 12px 0;
}
.dot-nav a {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.2); transition: background .25s, transform .25s;
  position: relative; text-decoration: none;
}
.dot-nav a::after {
  content: attr(data-label); position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%); font-size: 0.75rem; color: var(--muted-2);
  white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; font-weight: 500;
}
.dot-nav a:hover::after, .dot-nav a:focus-visible::after { opacity: 1; }
.dot-nav a.active { background: var(--ink); transform: scale(1.4); }
.dot-nav a.active::after { opacity: 1; color: var(--ink); }
/* 深色區塊上反白（由 JS 切換） */
.dot-nav.dark-bg a { background: rgba(255, 255, 255, 0.25); }
.dot-nav.dark-bg a:hover { background: rgba(255, 255, 255, 0.5); }
.dot-nav.dark-bg a.active { background: #fff; }
.dot-nav.dark-bg a::after { color: rgba(255, 255, 255, 0.55); }
.dot-nav.dark-bg a.active::after { color: #fff; }

@media (max-width: 900px) { .dot-nav { display: none; } }
@media (pointer: coarse) { .dot-nav { display: none; } }

/* ═══ 知識圖譜背景 ═══
   canvas 由 kg.js 插入為容器第一個子節點，節點資料來自 data.json 的 tree。
   內容一律墊到 canvas 之上，否則深色區塊的文字會被光暈吃掉。 */
.kg-host { position: relative; }
.kg-canvas {
  position: absolute; top: 0; left: 0; width: 100%;
  pointer-events: none; z-index: 0; display: block;
  /* height 由 kg.js 設定 —— 必須與 bitmap 尺寸一致，否則圖會被拉伸 */
}
/* 區塊比 canvas 高時，底部淡出，不要出現一條硬邊 */
.kg-canvas.kg-clipped {
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}
.kg-host > *:not(.kg-canvas) { position: relative; z-index: 1; }

/* ═══ 區段 ═══ */
section { padding: 88px 0; position: relative; }
section.tight { padding: 56px 0; }
section.dark { background: var(--ink); color: #fff; }
section.dark h1, section.dark h2, section.dark h3, section.dark h4 { color: #fff; }
section.dark p { color: rgba(255, 255, 255, 0.72); }
section.dark .lead { color: rgba(255, 255, 255, 0.66); }
section.dark strong { color: #fff; }
section.dark .eyebrow { color: rgba(255, 255, 255, 0.42); }
section.tinted { background: var(--surface); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  section { padding: 56px 0; }
  .container { padding: 0 20px; }
  .section-head { margin-bottom: 28px; }
  /* 標題在手機上刻意「不」縮小 —— h1 42.5px 一行約 7 個中文字，
     長標題會折到三行，這是明確要求的取捨。只收間距，不收字級。 */
}

/* ═══ HERO ═══ */
.hero {
  position: relative; background: var(--ink); color: #fff; overflow: hidden;
  min-height: calc(100vh - var(--header-h)); display: flex; align-items: center;
  margin-top: calc(-1 * var(--header-h)); padding-top: var(--header-h);
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('../images/cover.jpg') center/cover no-repeat;
  opacity: 1; transition: opacity 1.2s ease;
}
.hero-overlay {
  position: absolute; inset: 0;
  /* 底部收到全不透明：cover.jpg 把大標字烙在圖上，hero 高度隨視窗變動時
     會把那些字裁在下緣。讓圖在邊界前先溶進純色，交界就永遠是乾淨的。 */
  background: linear-gradient(to bottom,
    rgba(26, 26, 26, 0.55) 0%,
    rgba(26, 26, 26, 0.86) 58%,
    rgba(26, 26, 26, 0.97) 88%,
    rgba(26, 26, 26, 1) 100%);
  opacity: 0; transition: opacity 1.2s ease;
}
.hero .container { position: relative; z-index: 1; max-width: 820px; }
.hero-eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); margin-bottom: 18px; }
.hero-headline { font-size: clamp(2rem, 5.4vw, 3.75rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.035em; margin-bottom: 22px; color: #fff; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.3rem); line-height: 1.55; color: rgba(255, 255, 255, 0.84); margin-bottom: 14px; }
.hero-lead { font-size: clamp(0.9375rem, 1.5vw, 1.0625rem); color: rgba(255, 255, 255, 0.56); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-stats { margin-top: 30px; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.4); }
.hero-stats .h-counter, .hero-stats .h-plus { font-size: 1.4rem; font-weight: 800; color: rgba(255, 255, 255, 0.78); }
.hero-meta { margin-top: 32px; display: flex; gap: 28px; flex-wrap: wrap; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.38); }

.hero-eyebrow, .hero-headline, .hero-sub, .hero-lead, .hero-actions, .hero-stats, .hero-meta {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.hero.loaded .hero-bg { opacity: 0.34; transition-delay: .3s; }
.hero.loaded .hero-overlay { opacity: 1; transition-delay: .3s; }
.hero.loaded .hero-eyebrow { opacity: 1; transform: none; transition-delay: .45s; }
.hero.loaded .hero-headline { opacity: 1; transform: none; transition-delay: .6s; }
.hero.loaded .hero-sub { opacity: 1; transform: none; transition-delay: .75s; }
.hero.loaded .hero-lead { opacity: 1; transform: none; transition-delay: .88s; }
.hero.loaded .hero-actions { opacity: 1; transform: none; transition-delay: 1s; }
.hero.loaded .hero-stats { opacity: 1; transform: none; transition-delay: 1.12s; }
.hero.loaded .hero-meta { opacity: 1; transform: none; transition-delay: 1.22s; }

/* 窄螢幕的 cover 會把 cover.jpg 放得很大，烙在圖上的大標字更搶眼，
   所以手機版把遮罩壓更重、底圖再淡一階。 */
@media (max-width: 700px) {
  .hero-overlay {
    background: linear-gradient(to bottom,
      rgba(26, 26, 26, 0.72) 0%,
      rgba(26, 26, 26, 0.92) 55%,
      rgba(26, 26, 26, 1) 92%);
  }
  .hero.loaded .hero-bg { opacity: 0.26; }
}

/* 註：這裡刻意「不」用 prefers-reduced-motion 關閉效果。
   V1 沒有檢查這個設定，而部署環境（VDI、公司政策關閉系統動畫）常常
   回報 reduce —— 一旦 gate 在上面，多數實際使用者會看到完全靜止的頁面。
   要改回尊重系統設定，把這三處註解還原即可（另見 site.js / kg.js）。 */

/* ═══ 文件頁頁首 ═══ */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 16px; }
.page-head .lead { max-width: 680px; }
.page-head.dark { background: var(--ink); color: #fff; border-bottom: 0; }
.page-head.dark h1 { color: #fff; }
.page-head.dark .lead { color: rgba(255, 255, 255, 0.68); }
.page-head.dark .eyebrow { color: rgba(255, 255, 255, 0.42); }

/* ═══ 按鈕 ═══ */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9375rem; text-decoration: none;
  transition: transform .18s, background .18s, opacity .18s; border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #333; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--surface); }
section.dark .btn-primary, .hero .btn-primary { background: #fff; color: var(--ink); }
section.dark .btn-primary:hover, .hero .btn-primary:hover { background: #e2e2e2; }
section.dark .btn-outline, .hero .btn-outline { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
section.dark .btn-outline:hover, .hero .btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.btn-sm { padding: 8px 16px; font-size: 0.8125rem; }

/* ═══ 卡片格線 ═══ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px;
  background: var(--bg);
}
.card p:last-child { margin-bottom: 0; }
.card-num { font-size: 2.25rem; font-weight: 800; color: #d4d4d4; line-height: 1; margin-bottom: 10px; }
section.dark .card { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
section.dark .card-num { color: rgba(255, 255, 255, 0.2); }
section.tinted .card { background: #fff; }

.card-link { text-decoration: none; display: block; transition: transform .18s, box-shadow .18s, border-color .18s; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07); border-color: #d0d0d0; }
.card-arrow { font-weight: 700; font-size: 0.875rem; margin-top: 14px; display: inline-block; color: var(--ink); }

.tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--ink-3);
  background: var(--line-2); padding: 3px 10px; border-radius: 4px; margin-bottom: 12px;
}
section.dark .tag { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.75); }

/* ═══ 捲動淡入 ═══
   由 site.js 掛上 .reveal，進入視窗時加 .in。
   同一個容器內的元素依序錯開，形成由上而下浮現的節奏。 */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
/* 同上：不 gate。位移只有 20px，屬於溫和的淡入。 */

/* ═══ 死 / 活 對照 ═══
   左欄刻意做得沉、灰、扁；右欄有邊框與重量。
   對比本身就是論點，不需要額外的說明文字。 */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; margin-top: 36px; }
.compare-col { padding: 30px 28px; }
.compare-col h3 { font-size: 1.25rem; margin-bottom: 4px; }
.compare-col .compare-tag {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  display: block; margin-bottom: 10px;
}
.compare-col ul { list-style: none; margin: 18px 0 0; padding: 0; }
.compare-col li { font-size: 0.9375rem; line-height: 1.6; padding: 9px 0 9px 22px; position: relative; }
.compare-col li + li { border-top: 1px solid; }

/* 白底 + 細框：在 tinted 區塊上才看得出是一塊面板（--surface 會跟區塊底色撞色） */
.compare-dead {
  background: #fff; border: 1px solid var(--line); border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.compare-dead .compare-tag { color: var(--muted-2); }
.compare-dead h3 { color: var(--ink-3); }
.compare-dead p { color: var(--muted); font-size: 0.875rem; margin: 0; }
.compare-dead li { color: var(--muted); }
.compare-dead li + li { border-top-color: #e4e4e4; }
.compare-dead li::before { content: "×"; position: absolute; left: 2px; color: #c4c4c4; font-weight: 700; }

.compare-mid {
  display: flex; align-items: center; justify-content: center; padding: 0 10px;
  background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.compare-mid span {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted-2);
  writing-mode: vertical-rl; padding: 8px 0;
}

.compare-live { background: var(--ink); color: #fff; border-radius: 0 var(--radius) var(--radius) 0; }
.compare-live .compare-tag { color: rgba(255, 255, 255, 0.5); }
.compare-live h3 { color: #fff; }
.compare-live p { color: rgba(255, 255, 255, 0.62); font-size: 0.875rem; margin: 0; }
.compare-live li { color: rgba(255, 255, 255, 0.9); }
.compare-live li + li { border-top-color: rgba(255, 255, 255, 0.1); }
.compare-live li::before { content: "→"; position: absolute; left: 0; color: rgba(255, 255, 255, 0.45); font-weight: 700; }

@media (max-width: 720px) {
  .compare { grid-template-columns: 1fr; }
  .compare-dead { border-radius: var(--radius) var(--radius) 0 0; border-right: 1px solid var(--line); border-bottom: 0; }
  .compare-mid { border: 1px solid var(--line); border-top: 0; border-bottom: 0; }
  .compare-live { border-radius: 0 0 var(--radius) var(--radius); }
  .compare-mid { padding: 10px 0; }
  .compare-mid span { writing-mode: horizontal-tb; }
}

/* 編號步驟 */
.steps { counter-reset: step; }
.step { position: relative; counter-increment: step; padding: 24px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); }
.step::before {
  content: "0" counter(step); position: absolute; top: 12px; right: 16px;
  font-size: 2.25rem; font-weight: 800; color: rgba(255, 255, 255, 0.13); line-height: 1;
}
.step h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.09em; color: rgba(255, 255, 255, 0.45); margin-bottom: 6px; }
.step p { font-size: 0.9375rem; color: rgba(255, 255, 255, 0.9); margin: 0; }

/* ═══ 長文排版（why / quality / contribute） ═══ */
.prose { max-width: 720px; }
.prose h2 { margin: 56px 0 18px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 32px 0 10px; font-size: 1.25rem; }
.prose p { font-size: 1.0625rem; line-height: 1.85; }
.prose ul, .prose ol { margin: 0 0 18px 1.25rem; color: var(--ink-2); }
.prose li { margin-bottom: 10px; line-height: 1.8; }
.prose blockquote {
  border-left: 3px solid var(--ink); padding: 4px 0 4px 22px; margin: 28px 0;
  font-size: 1.125rem; line-height: 1.75; color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }
.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--ink);
  border-radius: var(--radius); padding: 22px 24px; margin: 28px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout h4 { margin-bottom: 8px; }

/* ═══ 表格 ═══ */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.02em; color: var(--ink-3); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ═══ 狀態徽章（資料狀況專用配色） ═══ */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.5;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge-verified { color: var(--ok); background: var(--ok-bg); }
.badge-unverified { color: var(--warn); background: var(--warn-bg); }
.badge-draft { color: var(--draft); background: var(--draft-bg); }
.badge-unknown { color: var(--idle); background: var(--idle-bg); }
.badge-plain { color: var(--ink-3); background: var(--line-2); }
.badge-plain::before { display: none; }
.badge-todo { color: var(--warn); background: var(--warn-bg); }
.badge-todo::before { display: none; }

/* ═══ 資料狀況儀表板 ═══ */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: #fff; padding: 20px 22px; }
.stat .stat-num { font-size: 1.875rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .stat-label { font-size: 0.8125rem; color: var(--muted); margin-top: 6px; }
.stat.is-ok .stat-num { color: var(--ok); }
.stat.is-warn .stat-num { color: var(--warn); }
.stat.is-idle .stat-num { color: var(--idle); }

.meter { margin: 10px 0 0; }
.meter-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-2); }
.meter-bar span { display: block; height: 100%; }
.meter-seg-verified { background: var(--ok); }
.meter-seg-unverified { background: #d9a441; }
.meter-seg-draft { background: #7d8bb5; }
.meter-seg-unknown { background: #d2d2d2; }
.meter-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 0.8125rem; color: var(--ink-3); }
.meter-legend span { display: inline-flex; align-items: center; gap: 6px; }
.meter-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.coverage-list { display: grid; gap: 14px; }
.coverage-row { display: grid; grid-template-columns: 130px 1fr 76px; gap: 14px; align-items: center; font-size: 0.875rem; }
.coverage-row .cov-key { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-3); }
.coverage-row .cov-track { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.coverage-row .cov-fill { height: 100%; background: var(--ink); border-radius: 999px; }
.coverage-row .cov-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.8125rem; }
@media (max-width: 560px) { .coverage-row { grid-template-columns: 96px 1fr 64px; gap: 10px; } }

/* ═══ 知識庫瀏覽介面 ═══ */
.kb-toolbar {
  position: sticky; top: var(--header-h); z-index: 40; background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 16px 0;
  margin-bottom: 28px;
}
.kb-search-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.kb-search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px;
  background: #fff; transition: border-color .18s, box-shadow .18s;
}
.kb-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.07); }
.kb-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 0.9375rem; padding: 12px 0; background: transparent; color: var(--ink); }
.kb-search .kb-search-icon { color: var(--muted-2); flex: 0 0 auto; font-size: 0.9375rem; }
.kb-search button {
  border: 0; background: none; cursor: pointer; color: var(--muted-2); font-size: 1.1rem;
  line-height: 1; padding: 4px; display: none;
}
.kb-search.has-value button { display: block; }

.kb-view-toggle { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex: 0 0 auto; }
.kb-view-toggle button {
  border: 0; background: #fff; cursor: pointer; font: inherit; font-size: 0.8125rem; font-weight: 600;
  color: var(--ink-3); padding: 11px 16px; transition: background .16s, color .16s;
}
.kb-view-toggle button + button { border-left: 1px solid var(--line); }
.kb-view-toggle button.active { background: var(--ink); color: #fff; }

.kb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }

/* 手機上這排篩選 chip 有三組、攤開約 150px 高，而工具列是 sticky 的，
   等於整趟捲動都有半個畫面被工具列佔著。窄螢幕改成收起來，
   由「篩選」鈕展開；桌機空間夠，維持全部攤開、鈕不出現。 */
.kb-filter-toggle { display: none; }

@media (max-width: 700px) {
  .kb-filter-toggle {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
    border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
    font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--ink-3);
    padding: 11px 16px; cursor: pointer;
  }
  .kb-filter-toggle::after { content: "▾"; font-size: 0.6875rem; }
  .kb-filter-toggle[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
  .kb-filter-toggle[aria-expanded="true"]::after { content: "▴"; }
  .kb-toolbar .kb-filters { display: none; }
  .kb-toolbar.filters-open .kb-filters { display: flex; }
}
.kb-filter-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kb-filter-label { font-size: 0.75rem; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; margin-right: 2px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 0.8125rem; padding: 6px 13px; color: var(--ink-3);
  transition: background .16s, border-color .16s, color .16s; white-space: nowrap;
}
.chip:hover { border-color: #c8c8c8; background: var(--surface); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.chip .chip-count { opacity: 0.55; margin-left: 5px; font-variant-numeric: tabular-nums; }
.kb-reset { border: 0; background: none; cursor: pointer; font: inherit; font-size: 0.8125rem; color: var(--muted); text-decoration: underline; padding: 6px 4px; }

.kb-resultbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 18px; font-size: 0.875rem; color: var(--ink-3);
}
.kb-resultbar strong { font-variant-numeric: tabular-nums; }
.kb-sort { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 10px; font: inherit; font-size: 0.8125rem; background: #fff; color: var(--ink-2); cursor: pointer; }

/* 卡片檢視 */
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.kb-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 10px; background: #fff;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.kb-card:hover { border-color: #cfcfcf; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); transform: translateY(-2px); }
.kb-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kb-card h3 { font-size: 1.125rem; margin: 0; line-height: 1.45; letter-spacing: -0.01em; }
.kb-card .kb-path { font-size: 0.75rem; color: var(--muted-2); }
.kb-card .kb-desc {
  font-size: 0.8125rem; color: var(--ink-3); line-height: 1.65; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.kb-card .kb-name { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); word-break: break-all; }

/* 「一份給人讀，一份給 AI 讀」在介面上也照著做：
   中文說明是主體，英文 SKILL 描述收起來，想看再展開。 */
.kb-ai { margin: -2px 0 0; }
.kb-ai summary {
  cursor: pointer; font-size: 0.75rem; color: var(--muted); list-style: none;
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 0;
}
.kb-ai summary::-webkit-details-marker { display: none; }
.kb-ai summary::before { content: "▸"; font-size: 0.6875rem; transition: transform .15s; }
.kb-ai[open] summary::before { transform: rotate(90deg); }
.kb-ai summary:hover { color: var(--ink-3); }
.kb-ai p {
  margin: 8px 0 0; font-size: 0.75rem; line-height: 1.6; color: var(--muted);
  background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px;
  /* SKILL.md 的英文描述是連續長句，窄容器會被裁掉 */
  overflow-wrap: anywhere;
}

.kb-table .t-summary { max-width: 340px; font-size: 0.8125rem; color: var(--ink-3); line-height: 1.55; }
.kb-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 0.75rem; color: var(--muted); }
.kb-card-foot a { color: var(--ink); font-weight: 600; text-decoration: none; }
.kb-card-foot a:hover { text-decoration: underline; }
.kb-links { display: flex; gap: 12px; }

/* 表格檢視 */
.kb-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.kb-table { border-collapse: collapse; width: 100%; font-size: 0.875rem; min-width: 860px; }
.kb-table th, .kb-table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.kb-table th { background: var(--surface); font-size: 0.75rem; font-weight: 700; color: var(--ink-3); position: sticky; top: 0; white-space: nowrap; }
.kb-table tbody tr:hover { background: #fafafa; }
.kb-table tbody tr:last-child td { border-bottom: 0; }
.kb-table .t-title { font-weight: 600; }
.kb-table .t-name { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.kb-table .t-links a { color: var(--ink); font-weight: 600; text-decoration: none; margin-right: 10px; white-space: nowrap; }
.kb-table .t-links a:hover { text-decoration: underline; }

.kb-empty { text-align: center; padding: 72px 24px; color: var(--muted); }
.kb-empty h3 { color: var(--ink); margin-bottom: 8px; }

/* 缺口清單（參與頁與知識庫共用） */
.gap-list { display: grid; gap: 10px; }
.gap-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.gap-item .gap-title { font-weight: 600; font-size: 0.9375rem; flex: 1; min-width: 0; }
.gap-item .gap-title small { display: block; font-weight: 400; color: var(--muted); font-size: 0.75rem; margin-top: 2px; }
.gap-item .gap-missing { display: flex; flex-wrap: wrap; gap: 5px; }

/* ═══ 貢獻者 ═══ */
.contributors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ═══ 貢獻者跑馬燈 ═══
   track 裡是兩份等寬的名單，位移一份的寬度（-50%）剛好無縫接回開頭。
   時長由 JS 依名單長度算，維持固定的移動速度。 */
.contrib-marquee { display: block; overflow: hidden; position: relative; }
.contrib-marquee-track {
  display: flex; width: max-content;
  animation: contrib-scroll 30s linear infinite;
}
.contrib-group { display: flex; gap: 8px; padding-right: 8px; }
@keyframes contrib-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
/* 要點名字不必追著跑；focus-within 讓鍵盤 tab 進去也會停 */
.contrib-marquee:hover .contrib-marquee-track,
.contrib-marquee:focus-within .contrib-marquee-track { animation-play-state: paused; }

/* 兩側淡出，讓名單看起來是從邊界外滾進來的 */
.contrib-marquee::before, .contrib-marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 1; pointer-events: none;
}
.contrib-marquee::before { left: 0; background: linear-gradient(to right, var(--bg), rgba(255, 255, 255, 0)); }
.contrib-marquee::after { right: 0; background: linear-gradient(to left, var(--bg), rgba(255, 255, 255, 0)); }
section.dark .contrib-marquee::before { background: linear-gradient(to right, var(--ink), rgba(26, 26, 26, 0)); }
section.dark .contrib-marquee::after { background: linear-gradient(to left, var(--ink), rgba(26, 26, 26, 0)); }
section.tinted .contrib-marquee::before { background: linear-gradient(to right, var(--surface), rgba(247, 247, 245, 0)); }
section.tinted .contrib-marquee::after { background: linear-gradient(to left, var(--surface), rgba(247, 247, 245, 0)); }

@media (prefers-reduced-motion: reduce) {
  .contrib-marquee-track { animation: none; }
}
.contributor {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: var(--line-2); border-radius: 999px; font-size: 0.875rem; font-weight: 500;
  color: var(--ink); text-decoration: none; transition: background .16s;
}
.contributor:hover { background: #e2e2e2; }
.contributor .count { font-size: 0.75rem; color: var(--muted-2); font-weight: 400; }
section.dark .contributor { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.92); }
section.dark .contributor:hover { background: rgba(255, 255, 255, 0.18); }
section.dark .contributor .count { color: rgba(255, 255, 255, 0.45); }

/* ═══ 活動卡 ═══ */
.event-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-bottom: 10px; background: #fff;
}
.event-card .event-info { flex: 2; min-width: 220px; }
.event-card .event-meta { font-size: 0.8125rem; color: var(--muted); margin-bottom: 4px; }
.event-card .event-meta strong { color: var(--ink); }
.event-card h3 { margin: 0 0 4px; }
.event-card p { margin: 0; font-size: 0.9375rem; }
section.dark .event-card { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
section.dark .event-card .event-meta { color: rgba(255, 255, 255, 0.5); }
section.dark .event-card .event-meta strong { color: rgba(255, 255, 255, 0.85); }
section.dark .event-card p { color: rgba(255, 255, 255, 0.6); }
.event-empty { text-align: center; padding: 28px; color: var(--muted); font-size: 0.9375rem; }

.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-sm); margin-top: 14px; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ═══ FOOTER ═══ */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; background: var(--surface); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
.footer-brand img { height: 26px; width: auto; opacity: 0.7; margin-bottom: 14px; }
.footer-brand p { font-size: 0.8125rem; color: var(--muted); line-height: 1.75; margin: 0; }
.footer-col h4 { font-size: 0.875rem; margin-bottom: 12px; letter-spacing: 0.02em; }
.footer-col a { display: block; font-size: 0.8125rem; color: var(--ink-3); text-decoration: none; padding: 4px 0; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-disclaimer { font-size: 0.8125rem; color: var(--muted); line-height: 1.75; max-width: 760px; margin-bottom: 10px; }
.footer-disclaimer strong { color: var(--ink-2); }
.footer-disclaimer a, .footer-legal a { color: var(--ink-3); }
.footer-legal { font-size: 0.75rem; color: var(--muted-2); margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ═══ 工具 ═══ */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }

/* ═══ 橫向滑動卡片 ═══
   一整節並列的重點（四道關卡、幾種做法…）改成一排可橫捲的卡片：
   縱向高度收掉大半，資訊一條都沒少，只是換成讀者自己決定要不要往右翻。
   桌機用捲軸或鍵盤左右鍵，觸控直接滑。 */
.hscroll { position: relative; margin: 22px 0 8px; }

/* 卡片列刻意不破格：寬度就跟正文一樣，左右邊界對齊上下的段落。
   （之前讓它延伸到 container 右緣，桌機多露一張卡，但整列相對
   正文往右凸出一塊，看起來是歪的。） */

.hscroll-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: 0 0 14px;
}
.hscroll-hint {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.8125rem; color: var(--muted); margin: 0;
}

.hscroll-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.hscroll-btn {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 1rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background .16s, border-color .16s, opacity .16s;
}
.hscroll-btn:hover:not(:disabled) { background: var(--surface); border-color: var(--ink-3); }
.hscroll-btn:disabled { opacity: 0.3; cursor: default; }
@media (pointer: coarse) { .hscroll-btn { width: 44px; height: 44px; } }

.hscroll-track {
  display: flex; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  counter-reset: hcard;
  padding: 2px 2px 14px;            /* 給卡片邊框與捲軸留位置 */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.hscroll-track::-webkit-scrollbar { height: 6px; }
.hscroll-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.hscroll-track:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: var(--radius); }

/* 右緣淡出＝「右邊還有」，捲到底由 JS 掛 .at-end 收掉，
   否則到底了還留著一片虛邊，反而像內容被切掉。
   用 mask 而不是疊一層漸層色塊：mask 不必知道底下是什麼顏色，
   放到深色或淺灰區塊都不用另外寫一組覆寫。 */
.hscroll-track {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
}
.hscroll.at-end .hscroll-track { -webkit-mask-image: none; mask-image: none; }

.hcard {
  flex: 0 0 clamp(256px, 72vw, 322px);
  scroll-snap-align: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 22px; display: flex; flex-direction: column;
  counter-increment: hcard;
}
.hcard::before {
  content: "0" counter(hcard);
  font-size: 1.625rem; font-weight: 800; line-height: 1;
  color: var(--line); margin-bottom: 12px;
}
.hcard h3 { font-size: 1.0625rem; line-height: 1.5; margin: 0 0 10px; }
.hcard p { font-size: 0.9375rem; line-height: 1.78; color: var(--ink-2); margin: 0 0 12px; }
.hcard p:last-child { margin-bottom: 0; }
.hcard .code-block { font-size: 0.6875rem; line-height: 1.7; padding: 12px 13px; margin: 0 0 12px; }
.hcard blockquote {
  margin: 0 0 12px; padding: 12px 14px; background: var(--surface);
  border-left: 2px solid var(--ink-3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.hcard blockquote p { font-size: 0.875rem; line-height: 1.7; margin: 0; color: var(--ink-2); }
/* 貼齊卡片底部，四張卡片的註腳因此對在同一條線上 */
.hcard-note {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-2);
  font-size: 0.8125rem; line-height: 1.7; color: var(--muted);
}
.hcard-note code { font-size: 0.75rem; }
