/* XinClarity 官網 — 唯一樣式檔
   色彩硬規則：
     1) --accent (#FFFF1A) 僅圖形點綴，禁止用於任何文字或需辨識的線條
     2) --brand  (#3366FF) 禁止當連結／內文色（淺底 4.33:1）；文字請用 --brand-deep
*/

:root {
  --page-bg:     #F4F6FA;
  --surface:     #FFFFFF;
  --surface-alt: #E8EBF2;
  --line:        #C6C8D2;
  --ink:         #1A1D26;
  --ink-muted:   #5A6175;
  --brand:       #3366FF;
  --brand-deep:  #22409E;
  --accent:      #FFFF1A;

  --maxw:   1120px;
  --radius: 10px;
  --radius-lg: 16px;    /* 卡片專用大圓角（Phase B §3.4.1）—— 刻意不改 --radius，
                           它另有 5 個用戶：Hero 視窗圖、.btn、.table-scroll、.erp-group、
                           .card__diagram（Phase B Task 2 新增，2026-08-11 最終審查 F5 補列） */
  --gap:    24px;

  /* --- 深色區塊 token（改版 Phase A §4.2）---
     只用於 .on-deep 區塊（Hero 與結尾 CTA），中段完全不受影響。
     對比實測見規格 §4.4。 */
  --ink-deep:      #111C36;   /* Hero 深底 */
  --ink-deep-2:    #10182C;   /* CTA 屏深底（略深，與 Hero 區隔） */
  --on-deep:       #FFFFFF;   /* 深底主文字        16.89:1 */
  --on-deep-muted: #A8B2C7;   /* 深底次要文字       7.93:1 */
  --brand-light:   #7EA6FF;   /* 深底專用品牌藍     7.07:1
                                 ⚠️ --brand #3366FF 在深底只有 3.61:1，不可當文字色 */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC",
               system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  /* 半透明底：用 color-mix 由 --page-bg 推導，避免在變數系統外複製色碼字面值 */
  background: color-mix(in srgb, var(--page-bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(6px);
}

.nav__logo { width: 40px; height: 40px; border-radius: 8px; }
.nav__name { font-size: 18px; font-weight: 700; }
.nav__zh   { color: var(--ink-muted); font-weight: 600; }

/* --- 深色區塊 scope（改版 Phase A §4.5）---
   accent 的放行以此 class 為界：.on-deep 內允許 #FFFF1A 當文字/細線（15.74:1），
   其餘區塊維持全面禁令（淺底 1.07:1）。
   放行必須 scoped —— 改成全域允許等於廢掉這條守了整個專案的規則。 */

.on-deep {
  background: var(--ink-deep);
  color: var(--on-deep);
}
/* 審查修正（本專案第四個同類「安靜蓋掉」缺陷）：這裡原本還有
   `.on-deep .section__title, .on-deep h1, .on-deep h2, .on-deep h3 { color: var(--on-deep); }`
   與 `.on-deep p { color: var(--on-deep-muted); }` 兩條規則，本意是統一供應深色屏文字色。
   但 .hero__title／.hero__eyebrow／.hero__sub／.cta-final__title／.cta-final__lead 各自
   也宣告了同名 color（見各自規則），特異度同為 (0,1,0)、源碼順序又排在這兩條「統一供應」
   規則之前，導致這兩條規則從未真正生效過（哨兵色實測驗證：把上面任一條換成刺眼色，算繪
   結果不變）。且 `.on-deep .section__title` 從未出現在 .on-deep 內（CTA 用的是
   .cta-final__title），是死選擇器。已直接刪除這兩條規則，改由每個元素自己的規則做唯一的
   color 來源——與本檔 .btn／.card 兩處「合併宣告、不分散」的既有慣例一致。 */
/* :not(.btn) —— 改版 Task 3 實測發現：.on-deep 內的 .btn／.btn--ghost-deep 已各自宣告
   明確的 color，但 .on-deep a（0,1,1）特異度高於單一 class 的 .btn（0,1,0），會覆蓋掉
   按鈕自己的顏色（Hero 主按鈕因此變成 brand-light 字 on brand 底，實測僅 1.96:1）。
   排除 .btn 讓按鈕自己的 color 規則生效，此規則只管一般內文連結。 */
.on-deep a:not(.btn) { color: var(--brand-light); }

/* 🔴 Critical 修正：鍵盤焦點框對比不足。下面 a:focus-visible 用的 --brand-deep 是為
   淺底選的（淺底 8.46:1），Hero／CTA 轉深色後同一個焦點框在 #111C36 上只剩 1.85:1、
   在 #10182C 上只剩 1.93:1，不達 WCAG 2.1 SC 1.4.11 的 3:1（規格 §10.3 硬規則）。
   改用 --brand-light（深底 7.07:1／7.39:1）。特異度 (0,2,1) 高於 a:focus-visible 的
   (0,1,1)，不靠選擇器順序也能自然蓋過去；刻意不排除 .btn，Hero 兩顆按鈕與 CTA 按鈕
   （唯一的轉換 CTA）都要吃到這個焦點框。 */
.on-deep a:focus-visible { outline-color: var(--brand-light); }

/* --- 版面工具 --- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* 改版 Task 4 附帶修正：.hero__title 用 text-wrap: balance 平衡行長，但中文
   預設任意字元可斷行，會把「資料」這個詞從中間切開。word-break: keep-all
   對純中文字元序列無效（該屬性只管 CJK 與非 CJK 混排邊界），故改用這個極簡
   工具類別包住不可切開的詞，維持語意邊界。 */
.nowrap { white-space: nowrap; }

.section { padding: 72px 0; }
.section--alt { background: var(--surface-alt); }

/* #specs 降權：比同檔的 .section 窄一級（Phase B §5.2.1）。
   ⚠️ 三檔各寫一條，一條都不能少。#specs.section 是 (1,1,0)、.section 是 (0,1,0)，
      media query 不增加特異度 —— 只寫基準這條的話，≤639px 時其他區塊 44px、
      #specs 卻停在 56px，降權會反過來變成加權。 */
#specs.section { padding: 56px 0; }

/* --- Typography 階層（改版 Phase A §4.6）---
   一律用 clamp() 自適應，不另立字級專用斷點（版面斷點仍是 1024 / 640）。
   相鄰層級字級比值維持 1.15–1.5，H1 上界 56px 對 H2 上界 32px = 1.75×，建立明確主從。
   以下各角色的字級／行高／字重合併進其既有選擇器規則，不另立第二條同名規則
   （本專案已因規則互相蓋掉出過兩次真實缺陷，見 .btn 與 .card 規則上方的說明）。 */
.section__title {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.section__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  /* 圖形點綴——這是 --accent 唯一允許的用法 */
  background: linear-gradient(90deg, var(--brand) 0 60%, var(--accent) 60% 100%);
}
.section__lead { margin: 0 0 32px; font-size: 16px; line-height: 1.75; font-weight: 400; color: var(--ink-muted); max-width: 62ch; }

/* --- 導覽 --- */
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.nav__brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.nav__links { display: flex; gap: 22px; flex-wrap: wrap; }

/* 導覽連結：底線由左滑入（spec §10.1） */
.nav__links a {
  position: relative;
  color: var(--ink-muted);
  font-size: 15px;
  transition: color 160ms ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav__links a:hover { color: var(--brand-deep); text-decoration: none; }
.nav__links a:hover::after,
.nav__links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* --- Hero（改版 Phase A §5）--- */

.hero {
  background:
    radial-gradient(circle at 75% 25%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 34%),
    var(--ink-deep);
  border-bottom: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 52% 48%;
  align-items: center;
  gap: var(--gap);
  padding-top: 96px;
  padding-bottom: 96px;
}

/* font-size/line-height/font-weight/letter-spacing 沿用 Task 2 已合併進這三條規則的
   Typography 階層數值（未改動），color／max-width 是後來疊加進「同一條」規則、不是
   另立新規則（避免蓋掉 Task 2 的字級成果、讓 check.ps1 的 Typography 斷言破功）。
   審查修正：這裡的 color 曾被誤認為只是「疊加在 .on-deep 統一供應色之上的覆寫」，
   實際上 .on-deep 那組統一供應 color 的規則從未生效過（特異度較低且源碼順序在前，
   該規則已刪除，見上方 .on-deep 區塊的說明）——這三條規則的 color 才是唯一生效的
   來源，不是疊加。 */
.hero__eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-deep-muted);
}
.hero__title {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--on-deep);
  max-width: 18ch;
  /* 修正輪 1：黃點縮小後孤字問題仍在（甚至換成 3 行、圓點自己一行）。真正卡住換行的是
     .hero__copy 的實際欄寬（561.59px，比 18ch 的 600.47px 解析值還窄），不是 18ch 本身
     ——18ch 從未真正生效，故不動它，也不動 §5.1 的 52%/48% 欄寬與 §4.6 的 clamp()。
     改用 text-wrap: balance 讓瀏覽器自動平衡多行長度、不再把單字或圓點擠成孤行；
     不支援時自然退回一般換行（漸進增強，不寫死 <br> 避免在其他寬度下斷點失真）。 */
  text-wrap: balance;
}

/* accent 唯一的文字用法，且在 .on-deep 內（15.74:1）。
   修正輪 1：原本沒設 font-size，直接繼承 H1 的 56px，圓點跟相鄰字幾乎等高等寬，從「點睛」
   變成「主角」。改用 0.36em（跟著 H1 用 clamp() 縮放，不寫死 px）大幅縮小，並用
   vertical-align 讓圓心大致落在字身中線，不沉底也不飄太高。 */
.on-deep .hero__dot {
  color: var(--accent);
  margin-left: 0.25em;
  font-size: 0.36em;
  vertical-align: 0.14em;
}

.hero__sub {
  margin: 0 0 36px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  font-weight: 400;
  color: var(--on-deep-muted);
  max-width: 62ch;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; }

/* --- Hero 產品畫面 window stack（§5.3，數值是規範不是建議）--- */

.hero__stack {
  position: relative;
  overflow: hidden;          /* 限制裝飾層溢出，非掩蓋版面錯誤 */
  min-height: 320px;
}

.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--brand) 28%, transparent), transparent 70%);
  filter: blur(40px);        /* 裝飾層允許 blur；產品 <img> 禁用 */
}

.hero__window {
  position: relative;
  z-index: 1;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand-light) 35%, transparent);
  box-shadow: 0 24px 60px color-mix(in srgb, #000 45%, transparent);
}
.hero__window img { display: block; width: 100%; height: auto; }

/* 三層階梯：EOI（最後）→ metadata（中）→ KPI（前）。
   每往後一層：偏移加大、縮小、降透明度、反向轉角加大，延續同一組規律。
   --far 與 --back 的 margin-top 都是 -18%，維持與原本兩層相同的重疊量。 */
.hero__window--far {
  transform: translate(10%, -7%) rotate(-2.6deg) scale(0.89);
  opacity: 0.7;
}
.hero__window--back {
  margin-top: -18%;
  transform: translate(6%, -4%) rotate(-1.5deg) scale(0.94);
  opacity: 0.85;
}
.hero__window--front {
  margin-top: -18%;
  transform: translate(-4%, 6%) rotate(1deg);
}

/* --- 按鈕 ---
   註（審查修正）：先前這裡分別散落三處宣告（基本樣式／hover 微浮起／CTA 漸層流動），
   最後加入的漸層流動用 background-image 疊加，而 hover 規則用 `background:` shorthand
   整組重設，導致漸層在 hover 時被歸零、從未真正出現過。已移除漸層流動效果，改為
   克制的實色 hover（浮起 + 陰影），並把三處宣告合併成一處，避免同一選擇器散落各處
   互相覆蓋。 */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #FFFFFF;          /* 白字 on #3366FF = 4.68:1 */
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  transition: transform 160ms ease, background-color 160ms ease,
              border-color 160ms ease, box-shadow 200ms ease;
  will-change: transform;
}
.btn:hover {
  background-color: var(--brand-deep);   /* 用 longhand，避免日後又被 shorthand 蓋掉其他 background-* */
  border-color: var(--brand-deep);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 28%, transparent);
}
.btn:active { transform: translateY(0); box-shadow: none; }

/* 深色屏的次要按鈕：透明底 + brand-light 字（7.07:1）
   位置註（改版 Task 3 實測發現）：刻意放在 .btn 之後——若放在 .hero 區段（比 .btn 早），
   同特異度（0,1,0）下這條的 background: transparent 會被後面 .btn { background: var(--brand); }
   蓋掉（後者定義在後），按鈕會變成看起來完全不透明的實色底。 */
.btn--ghost-deep {
  background: transparent;
  color: var(--brand-light);
  border: 1px solid color-mix(in srgb, var(--brand-light) 55%, transparent);
}
.btn--ghost-deep:hover {
  background: color-mix(in srgb, var(--brand-light) 12%, transparent);
  border-color: var(--brand-light);
  color: var(--brand-light);
}

/* --- 頁尾 --- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
  padding: 40px 0;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.6;
}
.site-footer__brand { margin: 0; font-weight: 700; color: var(--ink); }
.site-footer__line { margin: 6px 0 0; }

/* --- 卡片 ---
   註（審查修正）：與 .btn 同一類問題——原本另有兩處後續宣告，一處是純視覺的
   hover 抬升／邊框轉色，另一處是漸層邊框流動（用 background-clip: border-box
   疊出「邊框」，但 --accent 落在漸層中段，實測大片邊框被渲染成看不見的淺黃，
   且特異度被更晚的 .card:hover { border-color: var(--brand) } 蓋過，漸層只在
   靜止時看得到，方向完全相反）。已移除漸層邊框，改為單純的邊框轉色 + 抬升 +
   陰影，並把三處宣告合併成一處。 */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  /* 拿掉邊框後靠兩層陰影界定邊緣：白卡 #FFFFFF 落在 --page-bg #F4F6FA 上對比極弱，
     沒有陰影會糊進背景。 */
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent),
              0 6px 20px color-mix(in srgb, var(--ink) 6%, transparent);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover {
  transform: translateY(-3px);
  /* 色環用 box-shadow 而非 border：box-shadow 不佔版面盒模型，
     不會在 hover 瞬間把卡片內容推擠 1px。 */
  box-shadow: 0 0 0 1px var(--brand),
              0 2px 4px color-mix(in srgb, var(--ink) 5%, transparent),
              0 20px 44px color-mix(in srgb, var(--ink) 10%, transparent);
}

.cards { display: grid; gap: var(--gap); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }

/* --- 卡片能力示意圖（Phase B §3.2）---
   刻意不做滿版出血：.card 的 padding 在 ≤639px 會從 28px 26px 變成 22px 20px，
   滿版要用負 margin 抵銷，同一組數字得在兩個斷點各維護一次。本專案在 Phase A
   已出現四次「宣告寫了卻從未生效」的缺陷，不值得為視覺效果再開一個同類的坑。 */
.card__diagram {
  background: var(--surface-alt);
  border-radius: var(--radius);   /* 10px，比卡片本體的 16px 小一級 */
  padding: 18px 16px;
  margin: 0 0 20px;
}
.card__diagram-svg { display: block; width: 100%; height: auto; }

.card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card__tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.card__title { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 600; }
.card__lead  { margin: 0 0 18px; font-size: 16px; line-height: 1.75; color: var(--ink-muted); max-width: 62ch; }
.card__list  { margin: 0 0 22px; padding-left: 1.15em; font-size: 16px; line-height: 1.75; max-width: 62ch; }
.card__list li { margin-bottom: 6px; }

/* 卡底 CTA：由 <p> 改為真連結（Phase B §3.5）。
   色用 --brand-deep（白卡上 9.15:1），不用 --brand——後者在 --page-bg 上只有 4.33:1，
   同一顏色在兩種淺底上一過一不過是等著被誤用的規則，沿用 Phase A 的單一規則不開例外。
   焦點框由全域 a:focus-visible（:453）供給，不需另寫。 */
.card__more {
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--brand-deep);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
  transition: color 160ms ease;
}
.card__more::after {
  content: " →";
  display: inline-block;
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card:hover .card__more { text-decoration: underline; }
.card:hover .card__more::after { transform: translateX(5px); }

/* --- 規格表 --- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.spec-table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; line-height: 1.6; }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
/* 表頭降權（Phase B §5.2）：拿掉 --surface-alt 色塊，改用 2px 底線界定。
   tbody td 刻意維持 --ink 不變灰——這是全站唯一一處逐項對照三條產品線的地方，
   降權的手段是收斂裝飾與留白，不是犧牲資料本身。
   --ink-muted #5A6175 on .table-scroll 的白底 = 6.17:1，通過 AA。 */
.spec-table thead th { background: none; border-bottom: 2px solid var(--line); color: var(--ink-muted); font-size: 14px; letter-spacing: 0.04em; white-space: nowrap; }
.spec-table tbody th { white-space: nowrap; color: var(--ink-muted); font-weight: 600; }
.spec-table tbody tr:last-child th, .spec-table tbody tr:last-child td { border-bottom: 0; }

/* --- 差異化（Phase B §4：改成品牌段落）--- */
.why-statement {
  margin: 0 0 40px;
  font-size: 26px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 34ch;
}
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px var(--gap); }

/* 序號走左側落柱（span 兩列），不是壓在標題上方——落柱在四項之間形成一條垂直節奏，
   那正是「段落感」的來源；疊在上方只是把字放大，四項各自獨立仍讀成四則條目。 */
.why-item { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; }
.why-item__num {
  grid-row: 1 / span 2;
  font-size: 44px;
  line-height: 1;
  font-weight: 700;
  color: var(--brand-light);
  font-variant-numeric: tabular-nums;   /* 讓 01–04 等寬對齊 */
}
.why-item__title { grid-column: 2; margin: 0 0 8px; font-size: 18px; line-height: 1.5; }
.why-item p      { grid-column: 2; margin: 0; font-size: 16px; line-height: 1.75; color: var(--ink-muted); max-width: 62ch; }

/* --- ERP 支援度（Phase B §5.1：兩組權重拉開）--- */
.erp-group { padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.erp-group + .erp-group { margin-top: 18px; }

/* 已支援：主角。左側色條 + 深藍 badge。
   ⚠️ border-left 與 .erp-group 的 border 同特異度 (0,1,0)，本規則必須在它之後，順序不可調動。 */
.erp-supported { border-left: 4px solid var(--brand); }
.erp-supported .erp-badge { color: var(--brand-deep); }

/* 規劃中：降成一行文字「規劃中：鼎新電腦・天心資訊・文中資訊」。
   ⚠️ 容器／標籤／清單／項目四層都要處理，缺任一層算繪結果就不是一行：
     - 容器不拆方框 → 還是個框
     - 標籤不轉 inline → <p> 是 block，永遠自成一行（即使清單全對）
     - 清單不轉 inline → .chip-list 是 flex，子項的 display:inline 會被 blockify
     - 項目不去盒子 → 還是一顆顆膠囊
   清單這層必須是 inline 不能是 block：block 一定切斷行框。 */
.erp-planned { border: 0; background: none; padding: 0; }
.erp-planned .erp-badge        { display: inline; margin: 0; }
.erp-planned .erp-badge::after { content: "："; }
.erp-planned .chip-list        { display: inline; }
.erp-planned .chip-list li     { display: inline; padding: 0; border: 0; background: none; }
.erp-planned .chip-list li + li::before { content: "・"; }
/* .chip:hover 的抬升與陰影會套到這裡，讓一段行內文字在滑鼠經過時跳動——中和掉。 */
.erp-planned .chip-list li:hover { transform: none; box-shadow: none; }

.erp-badge {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-deep);
}
.erp-badge--planned { color: var(--ink-muted); }

/* ERP chip：輕微放大（transition 與 .card__tag 共用，見下方合併宣告） */
.chip-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--surface-alt);
  font-size: 15px;
}
/* 2026-08-11 最終審查 F6：border-color／border-style／background 三條在 Phase B 之後對
   唯一用途（規劃中三個 li）已被 .erp-planned .chip-list li 的 border: 0; background: none;
   蓋掉，成為 inert 宣告（畫面上看不出差異）。⚠️ color 仍然有效、class 不可刪——刪了規劃中
   文字會從 --ink-muted 變回 --ink，視覺降權會失效。 */
.chip--muted { border-color: var(--line); border-style: dashed; background: transparent; color: var(--ink-muted); }
.chip:hover { transform: translateY(-1px); box-shadow: 0 3px 10px color-mix(in srgb, var(--ink) 8%, transparent); }

/* 角標與 chip 微彈：兩個選擇器共用同一個 transition，故合併成一條規則 */
.card__tag, .chip { transition: transform 200ms cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 160ms ease; }
.card:hover .card__tag { transform: translateY(-2px) scale(1.04); }

/* --- 案例 --- */
.case-code {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #FFFFFF;          /* 白字 on #22409E = 8.9:1 */
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* 鍵盤焦點指示——加了 hover 動態就必須有這個，否則只服務滑鼠使用者
   （.btn 系列按鈕本身就是 <a>，已被下面的 a:focus-visible 涵蓋，不需再重複列一次）。
   --brand-deep 是為淺底選的（淺底 8.46:1）；深底的覆寫見上方 .on-deep 區塊的
   .on-deep a:focus-visible（Hero／CTA 屏改用 --brand-light，深底 7.07:1／7.39:1）。 */
a:focus-visible {
  outline: 3px solid var(--brand-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- 新潮動態（spec §11）---
   捲動驅動動畫全部包在 @supports 內：不支援 animation-timeline 的瀏覽器
   看不到這些宣告，內容直接以最終狀態呈現，不會變空白。 */

@keyframes xc-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes xc-line-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes xc-nav-solid {
  to {
    background: var(--page-bg);
    box-shadow: 0 2px 16px color-mix(in srgb, var(--ink) 10%, transparent);
  }
}

/* Hero 進場：不依賴 animation-timeline，一律會跑，故起始狀態可在 @supports 外 */
.hero__eyebrow,
.hero__title,
.hero__sub,
.hero__actions {
  animation: xc-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hero__eyebrow { animation-delay:  40ms; }
.hero__title   { animation-delay: 140ms; }
.hero__sub     { animation-delay: 260ms; }
.hero__actions { animation-delay: 380ms; }

@supports (animation-timeline: view()) {
  /* 區塊捲動揭示 */
  .section {
    animation: xc-rise 1ms linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 32%;
  }

  /* 標題裝飾線由左展開 */
  .section__title::after {
    transform-origin: left center;
    animation: xc-line-grow 1ms linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 40%;
  }

  /* 導覽列捲動後轉實 */
  .nav {
    animation: xc-nav-solid 1ms linear both;
    animation-timeline: scroll();
    animation-range: 0 120px;
  }
}

/* --- 尊重使用者的減少動態設定（spec §10.1 硬性要求）---
   原則：reduced-motion 移除的是「動作」，不是「狀態指示」。
   按鈕／卡片的抬升是純裝飾動作，用 transform: none 拿掉。
   導覽底線的展開／收合則是「目前指著哪一個連結」的狀態指示，不能拿掉——
   否則所有連結的底線會變成同一個固定樣子，使用者分不出滑鼠指到哪一個。
   底線本身仍受下面 *,*::before,*::after 的 transition: none !important 影響，
   於是「有沒有 hover／focus-visible」在 scaleX(0) 與 scaleX(1) 之間依舊會切換，
   只是切換方式從「滑入」變成「無動畫瞬間出現／收合」，狀態指示功能仍保留。 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  /* 動畫關閉後，進場元素必須停在最終狀態，不可停在起始狀態 */
  .hero__eyebrow, .hero__title, .hero__sub, .hero__actions,
  .section, .section__title::after {
    opacity: 1;
    transform: none;
  }
  .btn:hover, .card:hover, .chip:hover { transform: none; }
  .card:hover .card__more::after { transform: none; }
  .card:hover .card__tag { transform: none; }
}

/* --- 結尾 CTA 屏（改版 Phase A §7）--- */

.cta-final { background: var(--ink-deep-2); }
.cta-final__inner { text-align: center; padding-top: 88px; padding-bottom: 88px; }
.cta-final__title {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.35;
  font-weight: 700;
  color: var(--on-deep);
}
.cta-final__lead { margin: 0 auto 32px; color: var(--on-deep-muted); max-width: 62ch; }
.cta-final__action { margin: 0; }

/* 深色屏主要按鈕：brand-light 底 + ink-deep 字（7.07:1）
   ⚠️ 絕不可改成白字 on brand-light（2.39:1） */
.btn--on-deep {
  background: var(--brand-light);
  border-color: var(--brand-light);
  color: var(--ink-deep);
}
.btn--on-deep:hover {
  background: color-mix(in srgb, var(--brand-light) 85%, #FFFFFF);
  border-color: color-mix(in srgb, var(--brand-light) 85%, #FFFFFF);
  color: var(--ink-deep);
}

/* --- Footer 行政資訊 --- */
.footer-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px var(--gap);
  padding-bottom: 28px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.footer-info__label { margin: 0 0 4px; font-size: 13px; letter-spacing: 0.1em; color: var(--ink-muted); }
.footer-info__value { margin: 4px 0 0; font-size: 15px; color: var(--ink); }
.footer-info__value:first-of-type { margin-top: 0; }

/* --- 響應式 ---
   ≥1024 三欄 / 640–1023 兩欄 / <640 單欄
   規格表不參與：它在 .table-scroll 內自行橫捲，頁面本體永遠不橫捲。 */

@media (max-width: 1023px) {
  .cards--3      { grid-template-columns: repeat(2, 1fr); }
  .section       { padding: 56px 0; }
  #specs.section { padding: 44px 0; }
  .hero__grid    { grid-template-columns: 1fr; padding-top: 72px; padding-bottom: 72px; }
  .hero__stack   { min-height: 260px; }
}

@media (max-width: 639px) {
  .cards--3, .cards--2, .why-grid { grid-template-columns: 1fr; }
  .nav__inner  { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav__links  { gap: 16px; }
  .section     { padding: 44px 0; }
  #specs.section { padding: 36px 0; }
  .hero__grid  { padding-top: 56px; padding-bottom: 56px; }
  /* 疊放在 390px 會小到看不清內容，只留前景那張 */
  .hero__window--far   { display: none; }
  .hero__window--back  { display: none; }
  .hero__window--front { margin-top: 0; transform: none; }
  .hero__actions .btn { flex: 1 1 auto; text-align: center; }
  .card        { padding: 22px 20px; }
}

/* Footer 行政資訊斷點：獨立區塊，位置不再敏感——check.ps1 改版 Task 6 修正輪 2 已改用
   [regex]::Matches 掃描全部符合條件的 @media 區塊、依「最後一筆宣告」（CSS cascade
   意義下實際生效的那一條）判定，不再假設同條件的 @media 區塊在檔案裡只出現一次，
   放在這裡（或任何位置）都不影響驗證結果。
   改版（總代理／軟體開發兩家公司）：.footer-info 基準態已是 2 欄，≤1023px 不需要
   再單獨改成 2 欄（本來就是），只在 ≤639px 收成單欄。 */
@media (max-width: 639px)  { .footer-info { grid-template-columns: 1fr; } }
