/* 母片版型 v2（2026-10-21）：照 vault「05 方法/課程筆記/2026-10-21 版式设计要点」＋籌碼目錄排版稿。
   · 整站深底，跟 sales kit 同一套視覺；顏色只有：底、字、次要灰、強調橘（--accent，只給數字、小標、按鈕、連結）
   · 同一條左邊線：所有區塊左對齊 .wrap；標題／表格／卡片／圖用整版寬 --measure，
     連續閱讀的文字（段落、列表、引言）只到 --read（34em；Segoe UI 17px 實測每行 ≤80 字元），check 逐行實測、>80 擋上線
   · 組內距 < 組間距：小標貼標題、標題貼內文，區塊之間拉開
   · 填色與邊框二選一：卡片只填色不加框；表格只留橫線
   · 品牌只換 --accent / --dark / --dark-2（site.json theme） */
:root {
  --measure: 68rem;
  --read: 34em;
  --ink: #f3f3f3;
  --muted: #b9bcc2;
  --line: #3a3f47;
  --font: "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --gap-group: 96px;   /* 區塊之間 */
  --gap-item: 16px;    /* 區塊之內 */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--ink); background: var(--dark); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }

/* ---------- 頂部 ---------- */
.top { background: var(--dark); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo img { height: 22px; width: auto; }
.logo span { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: var(--muted); padding-top: 3px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current] { box-shadow: 0 2px 0 var(--accent); }
.nav .btn { color: var(--dark); box-shadow: none; }
.nav-t, .nav-b { display: none; }

.btn { display: inline-block; background: var(--accent); color: var(--dark); text-decoration: none;
  padding: 12px 22px; border-radius: 4px; border: 0; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- 主視覺 ---------- */
.hero { position: relative; padding: 56px 0 48px; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap { position: relative; }
.hero h1 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.1; margin: 0 0 18px; font-weight: 700; letter-spacing: -.01em; max-width: 18em; text-wrap: pretty; }
.lede { font-size: 20px; line-height: 1.5; color: var(--muted); margin: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 32px 0 0; }
.hero .meta { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.bc { font-size: 13px; color: var(--muted); margin-bottom: 20px; letter-spacing: .02em; }
.bc a { color: var(--muted); text-decoration: none; }
.bc a:hover { color: var(--ink); }

/* 有圖：圖貼右、往左淡出（目錄封面同款） */
.hero.has-img { min-height: 520px; display: flex; align-items: center; padding: 72px 0; }
.hero.has-img .wrap { width: 100%; z-index: 2; }
.hero.has-img .hero-img { position: absolute; top: 0; right: 0; height: 100%; width: 62%; object-fit: cover; object-position: right center; }
.hero.has-img::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--dark) 0, var(--dark) 38%, rgba(0,0,0,0) 62%); }
.hero.has-img .wrap > * { max-width: 34rem; }
.hero.has-img h1 { max-width: 13em; }
.hero.has-img .lede { max-width: 26em; }
.k-home .hero h1 { font-size: clamp(36px, 5vw, 58px); }
.k-home .lede { color: var(--accent); font-weight: 600; }

/* ---------- 內文 ---------- */
.body { padding: 72px 0 var(--gap-group); }
.prose .kick, .kick { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .14em; text-transform: uppercase; margin: var(--gap-group) 0 8px; line-height: 1; }
.prose h2 { font-size: 34px; line-height: 1.15; margin: var(--gap-group) 0 28px; font-weight: 700; letter-spacing: -.005em; }
.prose .kick + h2 { margin-top: 0; }
.prose > h2:first-child, .prose > .kick:first-child, .prose > :first-child { margin-top: 0; }
.prose h3 { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin: 40px 0 14px; }
.prose p, .prose li { text-wrap: pretty; }
.prose p { margin: 0 0 var(--gap-item); }
.prose p, .prose ul:not(.list), .prose ol:not(.flow), .lede { max-width: var(--read); }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 var(--gap-item); }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose a.btn { color: var(--dark); }
.prose a.card, .prose .list a { color: var(--ink); }
.prose code { background: #2c3036; padding: 1px 5px; border-radius: 3px; font-size: .9em; }

/* 大數字：數字大、單位小 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 32px 48px; margin: 8px 0 48px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.stat b { display: block; font-size: 60px; font-weight: 700; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.stat b small { font-size: 21px; font-weight: 600; margin-left: 6px; color: var(--muted); letter-spacing: 0; }
.stat span { display: block; font-size: 15px; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* 條目格：名稱在上、說明在下 */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 32px 48px; margin: 8px 0 var(--gap-item); }
.it b { display: block; font-size: 18px; font-weight: 600; color: var(--accent); margin-bottom: 6px; line-height: 1.35; }
.it span { display: block; font-size: 16px; line-height: 1.55; color: var(--muted); }

/* 表格：只留橫線 */
.tbl { overflow-x: auto; margin: 8px 0 32px; }
table { border-collapse: collapse; width: 100%; font-size: 17px; border-top: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 18px 24px 18px 0; border-bottom: 1px solid var(--line); line-height: 1.5; overflow-wrap: anywhere; }
thead th { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; padding: 0 24px 12px 0; }
table.hd { border-top: 0; }
table.hd td:first-child { font-weight: 600; }
table.hd td:not(:first-child) { color: var(--muted); }
table.kv th { width: 30%; font-size: 19px; font-weight: 600; }
table.kv td { color: var(--muted); }

figure { margin: 8px 0 40px; }
figure img { border-radius: 6px; width: 100%; }
/* 橫條：只取圖中間一段（目錄 P3 同款），白底圖固定高度整張放進去 */
figure.band img { aspect-ratio: 16 / 5; object-fit: cover; object-position: center; }
figure.panel img { height: 380px; object-fit: contain; background: #fff; }
figure.wide img { aspect-ratio: 16 / 7; object-fit: cover; }

/* 編號流程 */
.prose .flow, .flow { list-style: none; padding: 0; margin: 8px 0 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 12px; }
.flow li { background: var(--dark-2); border-radius: 6px; padding: 22px 18px 26px; font-size: 17px; font-weight: 600; line-height: 1.35; margin: 0; }
.flow li i { display: block; font-style: normal; color: var(--accent); font-weight: 700; font-size: 40px; line-height: 1; margin-bottom: 16px; }
.flow li a { color: var(--ink); text-decoration: none; }
.flow li a:hover { color: var(--accent); }

/* 圖片待補（上線前檢查會擋） */
.ph { margin: 8px 0 40px; border: 2px dashed #8a4c42; background: #2a2224; border-radius: 6px; min-height: 180px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #f0b5aa; }
.ph div { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.ph-sm { min-height: 180px; margin: 0; border-radius: 0; }

/* 產品卡：只填色、不加框 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 20px; margin: 8px 0 32px; }
.card { background: var(--dark-2); border-radius: 6px; text-decoration: none; display: flex; flex-direction: column; overflow: hidden; transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.card-t { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 8px; font-size: 21px; font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; }
.card p { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.card .more { margin-top: auto; color: var(--accent); font-size: 14px; font-weight: 600; }

/* 文章列表：跟 FAQ 同一套（同左邊線、同字級、同間距）。前面加 .prose 才壓得過 .prose ul 的縮排 */
.prose .list { list-style: none; padding: 0; margin: 0; }
.prose .list li { padding: 28px 0 12px; margin: 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.prose .list a { font-weight: 600; font-size: 21px; line-height: 1.3; text-decoration: none; }
.prose .list a:hover { color: var(--accent); }
.prose .list span { color: var(--muted); max-width: var(--read); padding-bottom: 12px; }

/* FAQ */
.k-faq .prose h2 { font-size: 21px; margin: 0; padding: 28px 0 10px; border-top: 1px solid var(--line); font-weight: 600; }
.k-faq .prose h2 + p { color: var(--muted); padding-bottom: 12px; }
.faq-mini { margin-top: var(--gap-group); }
.faq-mini h2 { margin-top: 0 !important; }
.faq-mini details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq-mini details:last-of-type { border-bottom: 1px solid var(--line); }
.faq-mini summary { font-weight: 600; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-mini summary::-webkit-details-marker { display: none; }
.faq-mini summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
.faq-mini details[open] summary::after { content: "–"; }
.faq-mini details p { color: var(--muted); margin: 12px 0 0; }
.faq-mini > p:last-child { margin-top: 20px; }

/* 收尾 CTA（目錄最後一頁同款） */
.cta { margin: var(--gap-group) 0 0; padding: 56px 0 0; border-top: 1px solid var(--line); }
.prose .cta-h { font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.15; margin: 0 0 14px; }
.prose .cta-t { font-size: 19px; color: var(--muted); margin: 0 0 28px; }
.cta-c { display: grid; grid-template-columns: max-content 1fr; gap: 10px 40px; margin: 36px 0 0; font-size: 18px; }
.cta-c dt { color: var(--muted); }
.cta-c dd { margin: 0; }
.prose .cta-c a { color: var(--ink); }

/* ---------- 詢價表單 ---------- */
.quote { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; background: var(--dark-2); border-radius: 6px; padding: 32px; margin: 0 0 32px; }
.quote label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.quote .full, .quote button, .quote .form-msg { grid-column: 1 / -1; }
.quote input, .quote textarea { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--dark); color: var(--ink); width: 100%; }
.quote input:focus, .quote textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.quote .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quote button { justify-self: start; }
.form-msg { margin: 0; font-weight: 600; }

/* ---------- 頁尾 ---------- */
/* 品牌欄＋三欄有標題的連結，底下一條分隔線放版權與法律連結；全部同一條左邊線 */
.foot { border-top: 1px solid var(--line); color: var(--muted); padding: 64px 0 32px; font-size: 14px; }
.foot-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; align-items: start; }
.foot-brand .logo { margin: 0 0 16px; }
.foot .logo span { display: inline; }
.foot-brand p { margin: 0 0 24px; line-height: 1.6; max-width: 22rem; }
.foot-brand .btn { padding: 10px 18px; font-size: 14px; }
.foot-h { margin: 0 0 16px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot li { line-height: 1.5; }
.foot a:not(.btn), .foot .linkbtn { color: var(--muted); text-decoration: none; }
.foot a:not(.btn):hover, .foot .linkbtn:hover { color: var(--ink); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; }
.foot-bottom p { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* 真的放不下（手機）才收成「Menu ☰」 */
@media (max-width: 680px) {
  .nav-b { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; line-height: 1; padding: 8px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; }
  .nav-b b { font-size: 18px; font-weight: 400; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--dark); flex-direction: column; align-items: flex-start; padding: 16px 16px 24px; gap: 16px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-t:checked ~ .nav { display: flex; }
}

@media (max-width: 860px) {
  :root { --gap-group: 64px; }
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  /* 中等寬度（平板、Claude 預覽窗）導覽照樣攤開，只縮間距 */
  .top .wrap { gap: 16px; }
  .nav { gap: 16px; font-size: 14px; }
  .logo span { display: none; }
  .nav .btn { padding: 9px 14px; }
  .hero.has-img { flex-direction: column; align-items: stretch; min-height: 0; padding: 40px 0 0; }
  .hero.has-img .hero-img { position: relative; width: 100%; height: 240px; margin-top: 32px; order: 2; }
  figure.panel img { height: 220px; }
  figure.band img { aspect-ratio: 16 / 7; }
  .hero.has-img::before { display: none; }
  .prose h2 { font-size: 28px; }
  .stat b { font-size: 46px; }
  .quote { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .foot-brand { grid-column: 1 / -1; }
  .quote { padding: 20px; }
  table.kv th { width: 38%; font-size: 17px; }
  th, td { padding: 14px 14px 14px 0; }
}

/* cookie 通知：Accept／Decline 同樣式（歐盟要求拒絕跟同意一樣容易） */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--dark-2); border-top: 1px solid var(--line);
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; font-size: 14px; color: var(--muted); }
.consent p { margin: 0; max-width: 40rem; line-height: 1.6; }
.consent a { color: var(--ink); }
.consent div { display: flex; gap: 12px; }
.consent .btn { padding: 10px 20px; }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.quote .form-note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); }
.quote .form-note a { color: var(--ink); }
