@charset "utf-8";

/* ============================================================
   page.css —— xlCompare 內頁公共樣式
   依賴 common.css 中的變量與導航/頁腳樣式
   ============================================================ */

/* ---------- 內頁頂部橫幅 ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%);
  text-align: center;
}
.page-hero::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(11, 158, 73, .16), transparent 70%);
  pointer-events: none;
}
.page-hero .inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.page-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--brand-dark); margin-bottom: 16px;
}
.page-eyebrow::before, .page-eyebrow::after {
  content: ""; width: 22px; height: 2px; background: var(--brand); border-radius: 2px;
}
.page-hero h1 { font-size: 40px; font-weight: 800; color: var(--ink); letter-spacing: -.6px; line-height: 1.2; }
.page-hero p { margin-top: 18px; font-size: 17px; color: var(--muted); }

/* ---------- 內頁內容區 ---------- */
.page-section { padding: 72px 0; }
.page-section.alt { background: var(--bg-alt); }
.page-section.pull-up { padding-top: 0; margin-top: -32px; position: relative; z-index: 1; }
.page-section.pt-56 { padding-top: 56px; }
.page-narrow { max-width: 880px; margin: 0 auto; }

.block-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.block-head .k {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--brand-dark); font-weight: 800; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase;
  margin-bottom: 12px;
}
.block-head .k::before { content: ""; width: 24px; height: 2px; background: var(--brand); border-radius: 2px; }
.block-head h2 { font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.block-head p { margin-top: 12px; color: var(--muted); font-size: 16px; }

/* ---------- 通用正文排版 ---------- */
.prose { color: var(--text); font-size: 16px; line-height: 1.85; }
.prose h2 { font-size: 26px; font-weight: 800; color: var(--ink); margin: 40px 0 16px; line-height: 1.35; }
.prose h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 28px 0 12px; }
.prose p { margin-bottom: 16px; }
.prose ul { margin: 0 0 18px; padding: 0; }
.prose ul li {
  position: relative; padding-left: 26px; margin-bottom: 10px; list-style: none;
}
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: 11px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand);
}
.prose a { color: var(--brand-dark); font-weight: 600; border-bottom: 1px solid var(--brand-light); }
.prose a:hover { border-color: var(--brand); }
.prose strong { color: var(--ink); }
.prose img { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin: 12px 0 8px; }
.prose code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 13.5px; background: var(--brand-soft); color: var(--brand-dark); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.prose pre { background: #0E2A1A; color: #D6E4DC; border-radius: 12px; padding: 16px 18px; overflow-x: auto; margin: 14px 0; font-size: 13px; line-height: 1.7; }
.prose pre code { background: none; color: inherit; padding: 0; border-radius: 0; word-break: normal; white-space: pre; }

/* ============================================================
   價格 / 購買
   ============================================================ */
/* 方案切換開關 */
.plan-switch { display: flex; justify-content: center; margin-bottom: 40px; }
.plan-switch .switch-track {
  display: grid; grid-template-columns: 1fr 1fr; position: relative; padding: 6px;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px;
}
.plan-switch .switch-thumb {
  position: absolute; top: 6px; left: 6px; bottom: 6px; width: calc(50% - 6px);
  background: var(--brand); border-radius: 999px; box-shadow: var(--shadow-sm);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.plan-switch.life .switch-thumb { transform: translateX(100%); }
.plan-switch button {
  position: relative; z-index: 1; border: none; background: transparent; cursor: pointer;
  padding: 11px 28px; border-radius: 999px; font-size: 15px; font-weight: 700;
  color: var(--muted); font-family: inherit; transition: color .3s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.plan-switch button.active { color: #fff; }
.plan-switch button .tag {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.plan-switch button:not(.active) .tag { background: var(--brand-light); color: var(--brand-dark); }

.plan-group { display: none; }
.plan-group.active { display: block; animation: planFade .4s ease; }
@keyframes planFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch;
}
.pricing-grid.duo {
  grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto;
}
.price-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px 26px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.price-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--brand-light); }
.price-card.popular { border-color: var(--brand); box-shadow: var(--shadow-md); }
.price-tag {
  align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: .5px;
  color: var(--brand-dark); background: var(--brand-light); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.price-card h3 { font-size: 19px; color: var(--ink); font-weight: 800; }
.price-period { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.price-amount { margin: 20px 0 4px; display: flex; align-items: baseline; gap: 8px; }
.price-amount .cur { font-size: 20px; font-weight: 800; color: var(--ink); }
.price-amount .now { font-size: 38px; font-weight: 800; color: var(--ink); letter-spacing: -1px; }
.price-amount .was { font-size: 16px; color: var(--muted); text-decoration: line-through; }
.price-meta { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.price-card .btn { width: 100%; justify-content: center; margin-top: auto; }
.price-feats { margin: 22px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 11px; }
.price-feats li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.6px; color: var(--text); list-style: none; }
.price-feats li svg { width: 17px; height: 17px; color: var(--brand); flex: none; margin-top: 2px; }
.price-feats li.off { color: var(--muted); opacity: .65; }
.price-feats li.off svg { color: var(--muted); }

/* 功能對比表 */
.compare-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 680px; background: #fff; }
.compare-table th, .compare-table td { padding: 15px 18px; text-align: center; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.compare-table thead th { background: var(--brand-soft); color: var(--ink); font-weight: 800; font-size: 14px; }
.compare-table tbody th { text-align: left; font-weight: 600; color: var(--text); }
.compare-table tbody tr:last-child td, .compare-table tbody tr:last-child th { border-bottom: none; }
.compare-table .yes { color: var(--brand); font-weight: 800; }
.compare-table .no { color: #C9D2CC; }
.compare-table tbody tr:hover { background: var(--brand-soft); }

/* ---------- FAQ / 連結卡 ---------- */
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.faq-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.faq-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.faq-card h4 { font-size: 16px; color: var(--ink); margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.faq-card h4 .arr svg { width: 17px; height: 17px; color: var(--brand); }
.faq-card p { font-size: 14px; color: var(--muted); }

/* 資訊行（許可説明等） */
.info-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.info-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.info-item .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.info-item .ic svg { width: 23px; height: 23px; }
.info-item h3 { font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.info-item p { font-size: 14.5px; color: var(--muted); line-height: 1.75; }

/* ============================================================
   下載頁
   ============================================================ */
.dl-hero-card {
  max-width: 720px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-md);
  padding: 40px; text-align: center;
}
.dl-hero-card .dl-ic {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 20px;
  background: linear-gradient(155deg, var(--brand), var(--brand-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.dl-hero-card .dl-ic svg { width: 36px; height: 36px; }
.dl-hero-card h2 { font-size: 24px; color: var(--ink); font-weight: 800; margin-bottom: 10px; }
.dl-hero-card p { color: var(--muted); font-size: 15.5px; margin-bottom: 24px; }
.dl-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.dl-actions .btn { padding: 15px 28px; font-size: 16px; }
.dl-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

.store-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px 32px; max-width: 720px; margin: 0 auto; }
.store-row img { height: 40px; width: auto; }
.store-row .store-txt { text-align: left; }
.store-row .store-txt h3 { font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.store-row .store-txt p { font-size: 13.5px; color: var(--muted); margin: 0; }

.changelog { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 32px 36px; }
.changelog ol { margin: 0; padding: 0; counter-reset: cl; list-style: none; }
.changelog ol li { position: relative; padding: 12px 0 12px 42px; border-bottom: 1px dashed var(--line); font-size: 15px; color: var(--text); }
.changelog ol li:last-child { border-bottom: none; }
.changelog ol li::before {
  counter-increment: cl; content: counter(cl);
  position: absolute; left: 0; top: 11px; width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   支援頁
   ============================================================ */
.support-cta { max-width: 760px; margin: 0 auto; text-align: center; background: linear-gradient(135deg, #0E2A1A 0%, var(--brand-dark) 100%); color: #fff; border-radius: 24px; padding: 56px 40px; position: relative; overflow: hidden; }
.support-cta::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%); top: -120px; right: -80px; }
.support-cta .s-ic { width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.support-cta .s-ic svg { width: 32px; height: 32px; }
.support-cta h2 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.support-cta p { font-size: 16px; opacity: .92; max-width: 540px; margin: 0 auto 26px; }
.support-cta .btn { padding: 15px 34px; font-size: 16px; }
.support-channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.chan { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; text-align: center; }
.chan .ic { width: 48px; height: 48px; border-radius: 13px; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.chan .ic svg { width: 24px; height: 24px; }
.chan h3 { font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.chan p { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.chan a { color: var(--brand-dark); font-weight: 700; font-size: 15px; }

/* ============================================================
   幫助文檔頁
   ============================================================ */
.doc-layout { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.doc-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 22px; }
.doc-toc h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 14px; }
.doc-toc nav { display: flex; flex-direction: column; gap: 2px; }
.doc-toc nav a { font-size: 14px; color: var(--text); padding: 7px 10px; border-radius: 8px; border-left: 2px solid transparent; }
.doc-toc nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.doc-toc nav a.sub { padding-left: 22px; font-size: 13px; color: var(--muted); }
.doc-content { min-width: 0; }
.doc-content h2 { scroll-margin-top: 90px; }
.doc-content h3 { scroll-margin-top: 90px; }
.doc-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px 34px; margin-bottom: 22px; }
.doc-card h2:first-child, .doc-card h3:first-child { margin-top: 0; }
.doc-figure { margin: 16px 0; text-align: center; }
.doc-figure img {
  max-width: 100%; width: auto; height: auto; display: inline-block;
  border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.doc-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

/* 目錄滾動條（主題色） */
.doc-toc { scrollbar-width: thin; scrollbar-color: var(--brand) var(--brand-soft); }
.doc-toc::-webkit-scrollbar { width: 8px; }
.doc-toc::-webkit-scrollbar-track { background: var(--brand-soft); border-radius: 999px; }
.doc-toc::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  border-radius: 999px; border: 2px solid var(--brand-soft);
}
.doc-toc::-webkit-scrollbar-thumb:hover { background: var(--brand-dark); }

/* ============================================================
   文章收錄頁 / 文章詳情頁
   ============================================================ */
/* 收錄頁分類與卡片 */
.art-cat { margin-bottom: 52px; }
.art-cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.art-cat-head .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; flex: none; }
.art-cat-head .ic svg { width: 21px; height: 21px; }
.art-cat-head h2 { font-size: 22px; font-weight: 800; color: var(--ink); }
.art-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.art-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.art-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.art-card h3 { font-size: 16px; color: var(--ink); margin-bottom: 8px; line-height: 1.45; }
.art-card p { font-size: 13.6px; color: var(--muted); line-height: 1.7; flex: 1; }
.art-card .more { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--brand-dark); }
.art-card .more svg { width: 15px; height: 15px; transition: transform .2s; }
.art-card:hover .more svg { transform: translate(3px, -3px); }

/* 文章詳情 */
.article-wrap { max-width: 860px; margin: 0 auto; }
.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a { color: var(--brand-dark); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 8px; color: var(--line); }
.article-body { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 40px 48px; }
.article-body .prose ol { margin: 0 0 18px; padding-left: 22px; }
.article-body .prose ol li { margin-bottom: 10px; }
.article-body .prose figure { margin: 18px 0; text-align: center; }
.article-body .prose figure img { max-width: 100%; width: auto; height: auto; display: inline-block; }
.article-body .prose figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.article-body .prose .inline-ico { height: 20px; width: auto; display: inline-block; vertical-align: middle; border: none; box-shadow: none; margin: 0 2px; border-radius: 0; }
.article-cta { margin-top: 28px; background: var(--brand-soft); border: 1px solid var(--brand-light); border-radius: 16px; padding: 26px 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.article-cta p { margin: 0; font-size: 15px; color: var(--text); font-weight: 600; }
.prose a.btn { border-bottom: none; }
.prose a.btn-primary { color: #fff; }
.prose a.btn-primary:hover { color: #fff; }
.see-also { margin-top: 28px; }
.see-also h3 { font-size: 16px; color: var(--ink); margin-bottom: 14px; }
.see-also-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.see-also-list a { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink); transition: border-color .2s, transform .15s; }
.see-also-list a:hover { border-color: var(--brand); transform: translateX(3px); }
.see-also-list a svg { width: 16px; height: 16px; color: var(--brand); flex: none; }
@media (max-width: 900px) { .art-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .art-grid { grid-template-columns: 1fr; } .see-also-list { grid-template-columns: 1fr; } .article-body { padding: 28px 22px; } }

/* ============================================================
   響應式
   ============================================================ */
@media (max-width: 980px) {
  .doc-layout { grid-template-columns: 1fr; gap: 28px; }
  .doc-toc { position: static; max-height: none; }
}
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .support-channels { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .page-hero { padding: 52px 0 48px; }
  .page-hero h1 { font-size: 28px; }
  .page-hero p { font-size: 15px; }
  .page-section { padding: 52px 0; }
  .faq-grid, .info-list { grid-template-columns: 1fr; }
  .block-head h2 { font-size: 24px; }
  .prose h2 { font-size: 22px; }
}
@media (max-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .dl-hero-card, .store-row, .changelog { padding: 28px 20px; }
  .dl-actions .btn { flex: 1 1 100%; }
}
