/* 網站共用樣式：手機優先、無外部字型、亮／暗色自動切換 */
:root {
  --bg: #ffffff;
  --surface: #f5f6f8;
  --surface-2: #eceff3;
  --text: #1c1f24;
  --muted: #5b6370;
  --border: #d9dde3;
  --link: #0b5cad;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-text: #ffffff;
  --ok: #15803d;
  --warn: #b45309;
  --note-bg: #fff7ed;
  --note-border: #fdba74;
  --radius: 10px;
  --wrap: 46rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1d2026;
    --surface-2: #262a31;
    --text: #e7e9ec;
    --muted: #a3aab5;
    --border: #353a43;
    --link: #7cb7ff;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-text: #14161a;
    --ok: #4ade80;
    --warn: #fbbf24;
    --note-bg: #2a2118;
    --note-border: #9a5b1f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--bg); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* 頁首 */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; padding-bottom: 6px; }
.site-name { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0 0 4px; overflow-x: auto; scrollbar-width: thin; }
.site-nav a { display: inline-block; padding: 6px 10px; border-radius: 999px; color: var(--text); text-decoration: none; white-space: nowrap; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--surface-2); }
@media (min-width: 720px) {
  .header-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

main { padding-top: 12px; padding-bottom: 40px; }
h1 { font-size: 1.6rem; line-height: 1.4; margin: 0.4em 0 0.3em; }
h2 { font-size: 1.3rem; line-height: 1.45; margin: 2em 0 0.6em; padding-bottom: 0.25em; border-bottom: 2px solid var(--border); }
h3 { font-size: 1.1rem; line-height: 1.5; margin: 1.6em 0 0.5em; }
h4 { font-size: 1rem; margin: 1.2em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 0.25em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
blockquote { margin: 1.2em 0; padding: 0.6em 1em; border-left: 4px solid var(--border); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); }
blockquote p:last-child { margin-bottom: 0; }
code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.92em; }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; }
.breadcrumb li + li { margin-top: 0; }
.post-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1em; }
.post-meta .sep { margin: 0 0.4em; }
.draft-banner { background: var(--warn); color: var(--bg); padding: 6px 12px; border-radius: var(--radius); font-weight: 700; }

/* 推廣揭露 */
.disclosure { display: block; background: var(--note-bg); border: 1px solid var(--note-border); border-radius: var(--radius); padding: 10px 14px; font-size: 0.92rem; margin: 0 0 1.2em; }
.disclosure a { margin-left: 0.5em; white-space: nowrap; }

/* 目錄 */
.toc { background: var(--surface); border-radius: var(--radius); padding: 10px 16px; margin: 0 0 1.5em; font-size: 0.95rem; }
.toc-title { font-weight: 700; margin: 0 0 0.3em; }
.toc ol { margin: 0; }

/* 表格：手機可左右滑動 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 100%; font-size: 0.93rem; line-height: 1.55; }
caption { caption-side: top; text-align: left; font-weight: 700; padding: 10px 12px 4px; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.al-r { text-align: right; }
.al-c { text-align: center; }
table.compare { width: max-content; min-width: 100%; }
table.compare td, table.compare thead th { min-width: 9.5rem; }
table.compare th[scope="row"], table.compare thead th:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--surface); white-space: nowrap; min-width: 5.5rem;
}
.row-price td, .row-cta td { background: var(--surface); }
.table-note { font-size: 0.82rem; color: var(--muted); margin-top: -0.4em; }

/* 價格與按鈕 */
.price { display: block; font-weight: 700; font-size: 1.05rem; }
.price-date { display: block; font-size: 0.78rem; color: var(--muted); }
.price-na { display: block; color: var(--muted); font-size: 0.9rem; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px;
  background: var(--accent); color: var(--accent-text); border-radius: 999px; font-weight: 700;
  text-decoration: none; white-space: nowrap; line-height: 1.2;
}
.cta:hover { background: var(--accent-hover); text-decoration: none; }
.cta::after { content: " ↗"; font-weight: 400; }

/* 商品卡 */
.product-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 1.2em 0; background: var(--bg); }
.pc-name { margin: 0 0 0.2em; }
.pc-meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.6em; }
.pc-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0 0 0.8em; font-size: 0.9rem; }
.pc-specs div { background: var(--surface); border-radius: 6px; padding: 6px 8px; }
.pc-specs dt { color: var(--muted); font-size: 0.78rem; }
.pc-specs dd { margin: 0; font-weight: 600; }
.pc-proscons { display: grid; gap: 8px; font-size: 0.92rem; }
.pc-proscons ul { margin: 0; }
.pc-label { font-weight: 700; margin: 0 0 0.2em; }
.pros .pc-label { color: var(--ok); }
.cons .pc-label { color: var(--warn); }
.pc-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
@media (min-width: 600px) {
  .pc-specs { grid-template-columns: repeat(3, 1fr); }
  .pc-proscons { grid-template-columns: 1fr 1fr; }
}

/* 持有成本 */
.cost { margin: 1.2em 0; }
.cost-table td { text-align: right; white-space: nowrap; }
.cost-table th[scope="row"] { min-width: 10rem; }
.cost-table .muted { color: var(--muted); }
.row-total th, .row-total td { font-weight: 700; background: var(--surface); }
.cost-formula { font-size: 0.9rem; }
.cost-sources { font-size: 0.82rem; color: var(--muted); }

/* FAQ */
.faq-item { border-top: 1px solid var(--border); padding: 0.4em 0; }
.faq-item h3 { margin: 0.6em 0 0.3em; font-size: 1.02rem; }
.faq-item h3::before { content: "Q. "; color: var(--accent); }

/* 資料來源、相關文章、列表 */
.sources { font-size: 0.9rem; }
.post-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.post-list li + li { margin-top: 0; }
.post-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.post-link { font-weight: 700; font-size: 1.03rem; }
.post-desc { margin: 0.3em 0; font-size: 0.92rem; color: var(--muted); }
.post-date { margin: 0; font-size: 0.8rem; color: var(--muted); }
.hero { padding: 0.5em 0 0.5em; }
.hero p, .lead { color: var(--muted); }
.cat-block h2 a { color: var(--text); text-decoration: none; }
.more { text-align: right; font-size: 0.92rem; }

/* 頁尾 */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); font-size: 0.85rem; color: var(--muted); padding: 18px 0 28px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0.6em 0; }
.copyright { margin: 0; }

@media (min-width: 720px) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 1.9rem; }
}
@media print {
  .site-nav, .cta, .related, .toc { display: none; }
}
