/**
 * legal.css —— 靜態法律頁（/about、/terms、/privacy）＋ 使用指南共用樣式。
 *
 * 為何要獨立檔：呢幾頁**唔經 React**（Meta／Apple 嘅爬蟲唔行 JS，要喺 raw HTML 讀到公司資料）。
 * 顏色跟 `src/styles.css` 嘅 token；字體用系統字（避免靜態頁要載 webfont）。
 */
:root {
  --brand: #0f766e;
  --brand-dk: #115e59;
  --brand-soft: #ccfbf1;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --r: 16px;
  --r-sm: 10px;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang HK", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
}

a { color: var(--brand-dk); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

/* ── 頂欄 ── */
.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 12px var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-head .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-dk);
  text-decoration: none;
}
.site-head .brand img { width: 28px; height: 28px; }
.site-head nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-left: auto; }
.site-head nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.site-head nav a:hover { color: var(--brand-dk); }
.site-head nav a[aria-current="page"] { color: var(--brand-dk); font-weight: 700; border-bottom-color: var(--brand); }

/* ── 內容 ── */
.doc {
  max-width: 46rem;
  margin: 0 auto;
  padding: 28px var(--gutter) 56px;
}
.doc h1 { font-size: 1.65rem; line-height: 1.3; margin: 0 0 6px; }
.doc .lead { color: var(--muted); margin: 0 0 20px; }
.doc h2 {
  font-size: 1.15rem;
  margin: 30px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.doc h3 { font-size: 1rem; margin: 18px 0 6px; }
.doc p { margin: 8px 0; }
.doc ul, .doc ol { margin: 8px 0 8px 1.25em; padding: 0; }
.doc li { margin: 5px 0; }
.doc code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
}
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.94rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface-2); font-weight: 700; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--gutter);
  margin: 16px 0;
}
.card.subtle { background: var(--surface-2); }
.note { color: var(--muted); font-size: 0.9rem; }
.updated { color: var(--muted); font-size: 0.85rem; margin-top: 28px; }

/* ── 公司資料表（Meta／Apple 驗證會睇）── */
table.facts { font-size: 0.95rem; }
table.facts th { width: 38%; white-space: nowrap; }

/* ── 頁腳 ── */
.site-foot {
  max-width: 46rem;
  margin: 0 auto;
  padding: 18px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-foot p { margin: 4px 0; }
.site-foot strong { color: var(--text); }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.site-foot .copy { margin-top: 10px; }

@media (max-width: 520px) {
  .doc { padding-top: 18px; }
  .doc h1 { font-size: 1.4rem; }
  table.facts th { width: auto; }
}
