@charset "utf-8";
/* Zegimi 設計系統 —— 匯票／單據質感：冷調證件紙、墨綠與磚橘、規線分欄、等寬數字。
   單一樣式表，全站頁面共用；新增區塊前先在這裡定義類別。 */

:root {
  /* 冷調證件紙：刻意避開暖奶油底色那一族（那是滿街都是的「高級感」預設）。
     暖度改由磚橘重點色與圖片承擔，底色保持中性偏冷，數字與規線才壓得住。
     所有文字色都對 --paper 驗過 ≥4.5:1。 */
  --paper: #ebefec;
  --paper-2: #e2e7e4;
  --sand: #dae1dd;
  --ink: #101c17;
  --ink-2: #33433d;
  --ink-3: #51605a;
  --pine: #1c5a48;
  --pine-2: #256b57;
  --brick: #ad4a1f;
  --brick-2: #8f3d18;
  --rule: #ccd5d0;
  --rule-2: #adbab4;
  --amber: #d99b2c;

  /* 拉丁字母與數字走系統無襯線，漢字才落到思源／蘋方／正黑。
     站上滿是 USDT、TRC20、5,000 這種字串，讓它們用真正的拉丁字體比讓漢字字體代打好看得多。 */
  --f-sans: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --f-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, "Noto Sans TC", monospace;

  --w: 1140px;
  --gut: 24px;
  --r: 3px;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--pine); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--brick); }
h1, h2, h3, h4 { line-height: 1.35; letter-spacing: -.01em; font-weight: 700; text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.small { font-size: .84rem; }
.muted { color: var(--ink-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 99;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem;
}
.skip:focus { inset-inline-start: 0; }

/* ---------- 頁首 ---------- */
.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 40;
}
.head-inner {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 62px;
}
/* 品牌區吃掉所有剩餘空間，其餘元素一律靠行尾。
   這樣不論語種切換條在不在（單語種時不存在），選單與切換條都會待在正確的一側。 */
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); margin-inline-end: auto; }
.brand-mark { width: 30px; height: 30px; flex: 0 0 30px; }
.brand-word {
  font-family: var(--f-mono); font-weight: 600; font-size: 1.02rem;
  letter-spacing: .19em; text-transform: uppercase;
}
.site-nav { order: 2; display: flex; gap: 1.4rem; align-items: center; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: .95rem;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brick); }
.nav-toggle {
  display: none; order: 4; min-height: 44px; padding: 0 .85rem;
  font: inherit; font-size: .9rem; color: var(--ink); background: transparent;
  border: 1px solid var(--rule-2); border-radius: var(--r); cursor: pointer;
}

/* ---------- 語種切換：下拉選單（每語種一條連結，含自指項）
   懸停與鍵盤 focus 都會展開，沒有 JS 也能用；main.js 只多加點擊開合與 Esc 收起。 */
.langmenu {
  order: 3; position: relative;
  margin-inline-start: 1.3rem;
  padding-inline-start: 1.3rem; border-inline-start: 1px solid var(--rule);
}
.langmenu-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; padding: 0; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 700; color: var(--ink);
  background: none; border: 0;
}
.langmenu-btn:hover { color: var(--brick); }
.langmenu-btn [lang="ur"] { font-size: 1.02rem; }
.langmenu-caret {
  width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--ink-3);
  transition: transform .15s ease;
}
.langmenu-btn[aria-expanded="true"] .langmenu-caret { transform: rotate(180deg); }
.langmenu-list {
  position: absolute; inset-inline-end: 0; top: 100%;
  min-width: 10.5rem; margin: 0; padding: .3rem 0; list-style: none;
  background: var(--paper); border: 1px solid var(--rule);
  box-shadow: 0 8px 20px rgba(31, 44, 39, .10);
  display: none; z-index: 60;
}
.langmenu:hover .langmenu-list,
.langmenu:focus-within .langmenu-list,
.langmenu-list.lang-open { display: block; }
.langmenu-list a {
  display: flex; align-items: center; min-height: 44px;
  padding: .2rem 1rem; font-size: .92rem;
  color: var(--ink-3); text-decoration: none;
}
.langmenu-list a:hover { background: var(--paper-2); color: var(--brick); }
.langmenu-list a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.langmenu-list [lang="ur"] { font-size: 1.04rem; }

/* ---------- 亞美尼亞語（hy）字體作用域 ----------
   拉丁／中文字體都不含亞美尼亞字母，不指定會掉字形；只覆蓋這一個語種，不動全站基礎樣式。 */
html[lang="hy"] body {
  font-family: "Noto Sans Armenian", "Noto Serif Armenian", Sylfaen, "Segoe UI", system-ui, sans-serif;
  line-height: 1.9;
  letter-spacing: 0;
}
html[lang="hy"] h1, html[lang="hy"] h2, html[lang="hy"] h3, html[lang="hy"] h4 { line-height: 1.4; letter-spacing: 0; }
/* 只有纯拉丁的品牌位保留等宽体；含亚美尼亚文的位置必须留在 Noto Sans Armenian，
   否则会掉到系统兜底字体（IBM Plex Mono / Consolas 都没有亚美尼亚字母）。 */
html[lang="hy"] .brand-word { font-family: var(--f-mono); }
html[lang="hy"] .mono, html[lang="hy"] .toc-title, html[lang="hy"] .foot-count,
html[lang="hy"] .foot-col h3, html[lang="hy"] .result-k, html[lang="hy"] .result-num,
html[lang="hy"] .rk, html[lang="hy"] .rv, html[lang="hy"] .badge-ok,
html[lang="hy"] .badge-warn, html[lang="hy"] .badge-bad, html[lang="hy"] .field-hint,
html[lang="hy"] .note-k, html[lang="hy"] .warn-k, html[lang="hy"] .answer-k,
html[lang="hy"] .toolcard-kind {
  font-family: "Noto Sans Armenian", Sylfaen, var(--f-sans);
}
/* 亚美尼亚文不习惯全大写与拉开的字距 */
html[lang="hy"] .foot-col h3, html[lang="hy"] .toc-title, html[lang="hy"] .note-k,
html[lang="hy"] .warn-k, html[lang="hy"] .answer-k, html[lang="hy"] .toolcard-kind,
html[lang="hy"] .result-k {
  text-transform: none; letter-spacing: .03em;
}

/* ---------- 規線分節標頭 ---------- */
.rule-head {
  display: flex; align-items: baseline; gap: 1rem;
  margin: 3.4rem 0 1.5rem; padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}
.rule-title { margin: 0; font-size: 1.58rem; }
.rule-note { margin-inline-start: auto; color: var(--ink-3); font-size: .85rem; }
.sec-intro { max-width: 62ch; color: var(--ink-2); margin: 0 0 1.6rem; }

/* ---------- 首頁 hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  grid-template-areas: "head slip" "body slip";
  column-gap: 3rem;
  padding: 2.6rem 0 2.2rem;
  align-items: start;
}
.hero-head { grid-area: head; }
.hero-body { grid-area: body; }
.slip-col { grid-area: slip; }
.hero-title {
  margin: 0 0 1rem; font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.24;
}
.hero-title em { font-style: normal; color: var(--pine); }
.lede { font-size: 1.06rem; color: var(--ink-2); margin: 0 0 1.5rem; max-width: 46ch; }
.signposts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 46ch; }
.signpost {
  display: grid; grid-template-columns: 2.4rem 1fr; gap: .9rem;
  padding: .7rem 0; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.sp-num { font-family: var(--f-mono); color: var(--brick); font-size: .85rem; }
.sp-text { font-size: .95rem; color: var(--ink-2); }
.sp-text a { color: var(--ink); }

/* ---------- 邀請碼收款單 ---------- */
.slip {
  position: relative; background: #fff; border: 1px solid var(--rule-2);
  border-radius: var(--r); padding: 1.5rem 1.4rem 1.25rem;
  box-shadow: 0 1px 0 var(--rule), 0 14px 34px -26px rgba(20, 33, 28, .55);
}
.slip::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--brick) 0 14px, transparent 14px 24px);
  border-radius: var(--r) var(--r) 0 0;
}
.slip-title { margin: 0 0 1rem; font-size: 1.06rem; }
.code-row { display: flex; align-items: stretch; gap: .55rem; }
.code {
  flex: 1 1 auto; font-family: var(--f-mono); font-weight: 600;
  font-size: 1.72rem; letter-spacing: .12em; color: var(--ink);
  background: var(--paper); border: 1px dashed var(--rule-2); border-radius: var(--r);
  padding: .5rem .7rem; display: flex; align-items: center;
}
.copy-btn {
  flex: 0 0 auto; min-width: 74px; min-height: 48px; cursor: pointer;
  font: inherit; font-size: .92rem; color: #fff; background: var(--pine);
  border: 0; border-radius: var(--r); padding: 0 .9rem;
}
.copy-btn:hover { background: var(--pine-2); }
.copy-btn[data-state="done"] { background: var(--brick); }
.slip-benefit { margin: 1rem 0 .35rem; font-size: .98rem; color: var(--ink); }
.slip-benefit b { color: var(--brick); }
.slip-note { margin: 0; font-size: .78rem; line-height: 1.7; color: var(--ink-3); }
.slip-steps { list-style: none; margin: 1.1rem 0 0; padding: .9rem 0 0; border-top: 1px solid var(--rule); }
.slip-steps li {
  font-size: .86rem; color: var(--ink-2); padding-inline-start: 1.5rem; position: relative;
  margin-bottom: .4rem;
}
.slip-steps li::before {
  content: counter(list-item) ".";
  position: absolute; inset-inline-start: 0; font-family: var(--f-mono);
  font-size: .78rem; color: var(--brick);
}

/* ---------- 編輯推薦（首頁唯一一處） ---------- */
.pick {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1.8rem;
  align-items: start; background: var(--sand); border: 1px solid var(--rule-2);
  border-radius: var(--r); padding: 1.5rem 1.6rem; margin-bottom: 1rem;
}
.pick img { border-radius: var(--r); display: block; width: 100%; border: 1px solid var(--rule-2); }
.pick-title { margin: .1rem 0 .55rem; font-size: 1.3rem; }
.pick-title a { color: var(--ink); text-decoration: none; }
.pick-title a:hover { color: var(--brick); }
.pick-desc { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- 文章索引（規線清單，不是卡片牆） ---------- */
.idx { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.idx-item {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) 9rem; gap: 1.1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: start;
}
.idx-item:hover { background: rgba(28, 90, 72, .05); }
.idx-num { font-family: var(--f-mono); font-size: .82rem; color: var(--brick); padding-top: .3rem; }
.idx-main { min-width: 0; }
.idx-title { margin: 0 0 .3rem; font-size: 1.06rem; }
.idx-title a { color: var(--ink); text-decoration: none; }
.idx-title a:hover { color: var(--brick); text-decoration: underline; }
.idx-desc { margin: 0; font-size: .9rem; color: var(--ink-2); }
.idx-side { text-align: end; font-size: .8rem; color: var(--ink-3); padding-top: .35rem; }
.tag {
  display: inline-block; font-size: .76rem; color: var(--pine);
  border: 1px solid var(--rule-2); border-radius: 999px; padding: .05rem .6rem;
  text-decoration: none; background: var(--paper);
}
.tag:hover { border-color: var(--brick); color: var(--brick); }

/* ---------- 工具區 ---------- */
.toolgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
/* 工具是奇數個時，最後一張補滿整行；否則第二欄會留下一塊填著規線色的空格子，看起來像卡片壞掉。 */
.toolgrid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.toolcard { background: var(--paper); padding: 1.25rem 1.35rem; display: block; text-decoration: none; color: inherit; }
.toolcard:hover { background: #fff; }
.toolcard-kind { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brick); }
.toolcard-name { margin: .35rem 0 .4rem; font-size: 1.06rem; color: var(--ink); }
.toolcard-desc { margin: 0; font-size: .89rem; color: var(--ink-2); }

/* ---------- 情境（分類）清單 ---------- */
.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.topic-item { border-top: 3px solid var(--pine); padding-top: .8rem; }
.topic-item:nth-child(2) { border-top-color: var(--brick); }
.topic-item:nth-child(3) { border-top-color: var(--amber); }
.topic-item:nth-child(4) { border-top-color: var(--ink-2); }
.topic-item a { color: var(--ink); text-decoration: none; font-weight: 700; }
.topic-item a:hover { color: var(--brick); }
.topic-item p { margin: .3rem 0 0; font-size: .85rem; color: var(--ink-3); }

/* ---------- 文章頁 ---------- */
.article { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 780px; margin: 0 auto; padding-bottom: 2rem; }
.crumb { font-size: .82rem; color: var(--ink-3); margin: 1.6rem 0 1.1rem; }
.crumb a { color: var(--ink-3); }
.crumb ol { display: flex; flex-wrap: wrap; align-items: baseline; list-style: none; margin: 0; padding: 0; }
.crumb li + li::before { content: "/"; padding: 0 .35rem; color: var(--rule-2); }
.art-title { margin: .2rem 0 .9rem; font-size: clamp(1.7rem, 3.6vw, 2.35rem); }
.art-meta {
  display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; align-items: center;
  font-size: .84rem; color: var(--ink-3);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: .6rem 0; margin-bottom: 1.6rem;
}
.art-lede { font-size: 1.08rem; color: var(--ink-2); margin: 0 0 1.6rem; }
.article-cover { margin: 0 0 1.8rem; }
.article-cover img { display: block; width: 100%; border: 1px solid var(--rule); border-radius: var(--r); }
.fig-cap { font-size: .8rem; color: var(--ink-3); margin: .5rem 0 0; }
.figure { margin: 2rem 0; }
.figure img { display: block; width: 100%; border: 1px solid var(--rule); border-radius: var(--r); }

.toc { border: 1px solid var(--rule-2); border-top: 2px solid var(--ink); border-radius: 0; padding: 1.1rem 1.3rem; margin: 0 0 2.2rem; background: #fff; }
.toc-title { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .6rem; }
.toc-list { list-style: none; margin: 0; padding: 0; counter-reset: toc; column-gap: 2rem; }
.toc-list li { counter-increment: toc; padding: .18rem 0; font-size: .93rem; }
.toc-list li::before { content: counter(toc, decimal-leading-zero) " "; font-family: var(--f-mono); font-size: .78rem; color: var(--brick); }
.toc-list a { color: var(--ink-2); text-decoration: none; }
.toc-list a:hover { color: var(--brick); text-decoration: underline; }

.prose { counter-reset: h2; }
.prose > h2 {
  counter-increment: h2; margin: 2.9rem 0 1rem; font-size: 1.42rem;
  padding-top: .8rem; border-top: 1px solid var(--rule); scroll-margin-top: 76px;
}
.prose > h2::before {
  content: counter(h2, decimal-leading-zero); display: block;
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .18em;
  color: var(--brick); margin-bottom: .35rem;
}
.prose h3 { margin: 1.9rem 0 .7rem; font-size: 1.1rem; color: var(--pine); }
.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-inline-start: 1.35rem; }
.prose li { margin-bottom: .45rem; }
.prose strong { color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

.answer {
  background: var(--sand); border: 1px solid var(--rule-2);
  padding: .95rem 1.15rem; margin: 0 0 1.4rem; border-radius: var(--r);
}
.answer p { margin: 0; }
.answer .answer-k { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--pine); display: block; margin-bottom: .3rem; }
.timeline { list-style: none; margin: 0 0 2rem; padding: 0; border-inline-start: 2px solid var(--rule-2); }
.timeline li { position: relative; padding: 0 0 1.1rem 1.5rem; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: -6px; top: .75em;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brick);
}
.tl-when { display: block; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .06em; color: var(--ink-3); }
.tl-what { font-size: .96rem; }

.note, .warn {
  border: 1px solid var(--rule-2); border-radius: var(--r);
  padding: .95rem 1.15rem; margin: 1.5rem 0; font-size: .95rem; background: #fff;
}
.warn { border-color: var(--brick); background: #fbf1ea; }
.note p:last-child, .warn p:last-child { margin-bottom: 0; }
.note p:first-child, .warn p:first-child { margin-top: 0; }
.note-k, .warn-k {
  display: block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: .35rem; color: var(--ink-3);
}
.warn-k { color: var(--brick-2); }

.prose table, .cmp-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.prose th, .prose td, .cmp-table th, .cmp-table td { border: 1px solid var(--rule); padding: .55rem .7rem; text-align: start; vertical-align: top; }
.prose th, .cmp-table th { background: var(--sand); font-weight: 700; }
.prose tbody tr:nth-child(even) td, .cmp-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .55); }
.table-scroll { overflow-x: auto; }

.faq { margin: 2.6rem 0 0; }
.faq-item { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.faq-q { margin: 0 0 .5rem; font-size: 1.02rem; }
.faq-a { margin: 0; color: var(--ink-2); }

/* affiliate 連結區（只在轉化頁出現） */
.aff { border: 1px solid var(--pine); border-radius: var(--r); padding: 1.2rem 1.3rem; margin: 1.8rem 0; background: #fff; }
.aff-go {
  display: inline-block; background: var(--pine); color: #fff; text-decoration: none;
  padding: .7rem 1.3rem; border-radius: var(--r); font-weight: 700; min-height: 44px;
}
.aff-go:hover { background: var(--pine-2); color: #fff; }
.aff-note { margin: .8rem 0 0; font-size: .82rem; color: var(--ink-3); line-height: 1.7; }

.authorcard { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 1rem; border-top: 2px solid var(--ink); padding-top: 1.2rem; margin-top: 3rem; }
.author-sigil { width: 54px; height: 54px; border-radius: 50%; background: var(--pine); color: #fff; display: grid; place-items: center; font-family: var(--f-mono); font-size: 1.1rem; }
.author-name { margin: 0 0 .3rem; font-size: 1rem; }
.author-bio { margin: 0; font-size: .87rem; color: var(--ink-2); }
.more-links { margin: 2.4rem 0 0; border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.more-links ul { list-style: none; margin: .6rem 0 0; padding: 0; }
.more-links li { padding: .3rem 0; font-size: .95rem; }

/* ---------- 工具頁 ---------- */
.tool { max-width: 900px; margin: 0 auto; }
.tool-panel { background: var(--ink); color: var(--paper); border-radius: var(--r); padding: 1.6rem 1.5rem; margin: 1.6rem 0 1.4rem; }
.tool-panel h2 { margin: 0 0 1.1rem; font-size: 1.05rem; color: var(--paper); font-weight: 500; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .82rem; color: #b9c6bf; }
.field input, .field select, .field textarea {
  font: inherit; font-family: var(--f-mono); font-size: 1rem; min-height: 46px;
  background: #1d2c26; color: var(--paper); border: 1px solid #35473f;
  border-radius: var(--r); padding: .5rem .7rem; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.field-hint { font-size: .76rem; color: #8fa39a; }
.btn {
  font: inherit; min-height: 46px; padding: 0 1.3rem; cursor: pointer;
  background: var(--amber); color: #21170a; border: 0; border-radius: var(--r); font-weight: 700;
}
.btn:hover { background: #e8ab3c; }
.btn-sub { background: transparent; color: var(--paper); border: 1px solid #46564e; }
.btn-sub:hover { background: #22322b; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

.result { background: #101a16; border: 1px solid #2b3b34; border-radius: var(--r); padding: 1.3rem 1.4rem; margin-top: 1.3rem; }
.result-k { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: #8fa39a; }
.result-num { font-family: var(--f-mono); font-size: clamp(2rem, 6vw, 2.9rem); font-weight: 600; color: var(--amber); line-height: 1.2; margin: .2rem 0; word-break: break-word; }
.result-sub { font-size: .88rem; color: #b9c6bf; margin: 0; }
.rrow { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid #2b3b34; padding: .5rem 0; font-size: .9rem; }
.rk { color: #b9c6bf; }
.rv { font-family: var(--f-mono); color: var(--paper); }
.badge-ok, .badge-bad, .badge-warn { display: inline-block; font-size: .78rem; padding: .1rem .6rem; border-radius: 999px; font-family: var(--f-mono); }
.badge-ok { background: #1f5c4a; color: #dff3ea; }
.badge-bad { background: #7a2f18; color: #ffe4d8; }
.badge-warn { background: #6b5312; color: #fdefcf; }

.tool-note { font-size: .84rem; color: var(--ink-2); margin: 1rem 0 0; }
.cmp-table tbody tr.row-top td { background: #fbf1e7; box-shadow: inset 0 2px 0 var(--brick), inset 0 -2px 0 var(--brick); }
.cmp-table td small { color: var(--ink-3); }
.tool-lede { font-size: 1.04rem; color: var(--ink-2); margin: 0 0 1.4rem; }
.tool-panel .field-row + .btn-row { margin-top: .4rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--ink-3); margin: .8rem 0 0; }
.qset { border: 0; margin: 0 0 1.4rem; padding: 0; }
.qset legend { font-size: .9rem; color: #d8e2dd; padding: 0 0 .6rem; font-weight: 500; }
.opts { display: grid; gap: .5rem; }
.opt { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-size: .93rem; color: #cfdad5; min-height: 44px; padding: .4rem .2rem; }
.opt input { width: 18px; height: 18px; margin: .3rem 0 0; flex: 0 0 18px; accent-color: #d99b2c; }
.opt span small { display: block; color: #8fa39a; font-size: .8rem; }
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.step-list li {
  counter-increment: st; position: relative; padding: .55rem 0 .55rem 2.4rem;
  border-bottom: 1px solid var(--rule); font-size: .95rem;
}
.step-list li::before {
  content: counter(st, decimal-leading-zero); position: absolute; inset-inline-start: 0;
  font-family: var(--f-mono); font-size: .8rem; color: var(--brick); top: .75rem;
}
.guide { border: 1px solid var(--rule-2); border-radius: var(--r); margin: 2rem 0; background: #fff; }
.guide > summary { cursor: pointer; padding: .9rem 1.2rem; font-weight: 700; list-style: none; }
.guide > summary::-webkit-details-marker { display: none; }
.guide > summary::before { content: "＋ "; color: var(--brick); font-family: var(--f-mono); }
.guide[open] > summary::before { content: "－ "; }
.guide-body { padding: 0 1.2rem 1.2rem; }
.guide-body h3 { margin: 1.3rem 0 .5rem; font-size: 1rem; color: var(--pine); }
.guide-body p, .guide-body li { font-size: .92rem; }
.guide-body ul { padding-inline-start: 1.3rem; }

.flow { margin: 1.6rem 0; }
.flow svg { width: 100%; height: auto; display: block; }
.gloss { list-style: none; margin: 1.2rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.gloss-item { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.gloss-term { margin: 0 0 .25rem; font-size: 1rem; }
.gloss-term .mono { color: var(--ink-3); font-size: .82rem; margin-inline-start: .5rem; }
.gloss-def { margin: 0; font-size: .92rem; color: var(--ink-2); }
.search-box {
  width: 100%; font: inherit; min-height: 46px; padding: .5rem .8rem;
  border: 1px solid var(--rule-2); border-radius: var(--r); background: #fff; color: var(--ink);
}
.empty-hint { padding: 1.2rem 0; color: var(--ink-3); font-size: .92rem; }

/* 分析統計開關（只出現在隱私說明頁） */
.optout { margin: 1.3rem 0 1.5rem; }
.optout-btn {
  font: inherit; font-size: .92rem; min-height: 44px; padding: 0 1.15rem; cursor: pointer;
  color: var(--ink); background: #fff;
  border: 1px solid var(--ink); border-radius: var(--r);
}
.optout-btn:hover { background: var(--ink); color: var(--paper); }
.optout-btn[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: #fff; }
.optout-btn[aria-pressed="true"]:hover { background: var(--pine-2); border-color: var(--pine-2); }
.optout-state { margin: .6rem 0 0; }

/* ---------- 頁尾 ---------- */
.site-foot { background: var(--ink); color: #c3cfc9; margin-top: 4rem; padding: 2.8rem 0 2rem; font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.foot-brand .brand-word { color: var(--paper); }
.foot-brand .brand { color: var(--paper); }
.foot-about { margin: .9rem 0 0; line-height: 1.8; max-width: 42ch; }
.foot-about a { color: var(--amber); }
.foot-col h3 { font-size: .78rem; font-family: var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: #8fa39a; margin: 0 0 .7rem; font-weight: 600; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { padding: .18rem 0; }
.foot-links a { color: #c3cfc9; text-decoration: none; }
.foot-links a:hover { color: var(--amber); }
.foot-bottom {
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center;
  border-top: 1px solid #2b3b34; margin-top: 2.2rem; padding-top: 1.1rem;
  font-size: .82rem; color: #8fa39a;
}
.foot-bottom a { color: #8fa39a; }
.foot-count { font-family: var(--f-mono); }

/* ---------- 404 ---------- */
.nf { max-width: 640px; margin: 4rem auto; text-align: start; }
.nf-code { font-family: var(--f-mono); font-size: 4rem; color: var(--brick); margin: 0; line-height: 1; }

/* ---------- 響應式 ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "slip" "body"; row-gap: 1.5rem; padding-top: 1.4rem; }
  .slip-col { max-width: 520px; }
  .toolgrid { grid-template-columns: minmax(0, 1fr); }
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick { grid-template-columns: minmax(0, 1fr); }
  .pick img { max-width: 320px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: inline-block; }
  .langmenu { order: 2; margin-inline-start: 0; padding-inline-start: 0; border-inline-start: 0; }
  .site-nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 0; padding: .4rem var(--gut) 1rem;
  }
  .site-nav.nav-open { display: flex; }
  .site-nav a { padding: .75rem 0; border-bottom: 1px solid var(--rule); min-height: 44px; }
  .site-head { position: static; }
  .head-inner { position: relative; }
  .hero-title { font-size: 1.72rem; }
  .lede { font-size: 1rem; }
  .idx-item { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .idx-side { grid-column: 2; text-align: start; padding-top: .45rem; }
  .topics { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .code { font-size: 1.45rem; }
  .authorcard { grid-template-columns: minmax(0, 1fr); }
  .author-sigil { display: none; }
  .rule-head { margin-top: 2.4rem; flex-wrap: wrap; }
  .rule-note { margin-inline-start: 0; width: 100%; }
}

@media (max-width: 380px) {
  :root { --gut: 16px; }
  .hero-title { font-size: 1.5rem; }
  .code { font-size: 1.3rem; letter-spacing: .08em; }
  .copy-btn { min-width: 64px; }
}

/* ---------- 動效 ----------
   只做兩件事：指到哪裡、按下去有沒有反應。沒有第三種動畫。 */
a, .btn, .btn-sub, .copy-btn, .optout-btn, .aff-go, .toolcard, .idx-item, .tag,
.langmenu-btn, .langmenu-list a, .topic-item a, .foot-links a, .guide > summary {
  transition: color .16s cubic-bezier(.2, .7, .3, 1),
              background-color .16s cubic-bezier(.2, .7, .3, 1),
              border-color .16s cubic-bezier(.2, .7, .3, 1);
}
.btn:active, .btn-sub:active, .copy-btn:active, .optout-btn:active, .aff-go:active { transform: translateY(1px); }
:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--pine-2); outline-offset: 2px; border-radius: 1px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-head, .site-foot, .slip-col, .toc { display: none; }
}
