/* 人脈王官網：紙、墨、一個赤陶強調色。標題用思源宋體，內文用思源黑體。 */
:root {
  --bg: #F8F5F0;
  --surface: #FFFFFF;
  --surface-alt: #EFEAE2;
  --border: #D9D1C4;
  --outline: rgba(23, 21, 15, 0.22);
  --text: #17150F;
  --muted: #625C53;
  --faint: #857C70;
  --primary: #17150F;
  --primary-text: #FBF8F3;
  --accent: #B8471D;
  --accent-text: #FFFFFF;
  --accent-soft: #F9EEE8;
  --plum: #6B5A8E;
  --success: #3B7556;
  --shadow: 0 18px 40px -24px rgba(23, 21, 15, 0.35);
  --serif: "Noto Serif TC", "Songti TC", "PingFang TC", "Microsoft JhengHei", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Helvetica Neue", Arial, "Microsoft JhengHei", sans-serif;
  --wrap: 1040px;
  --gutter: 16px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110;
    --surface: #1C1A17;
    --surface-alt: #26231F;
    --border: #332F29;
    --outline: rgba(241, 236, 228, 0.26);
    --text: #F1ECE4;
    --muted: #B3ABA0;
    --faint: #8C8378;
    --primary: #F1ECE4;
    --primary-text: #15130F;
    --accent: #E8814F;
    --accent-text: #15130F;
    --accent-soft: #2A1F1A;
    --plum: #B39BD6;
    --success: #7CC29A;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  --bg: #121110;
  --surface: #1C1A17;
  --surface-alt: #26231F;
  --border: #332F29;
  --outline: rgba(241, 236, 228, 0.26);
  --text: #F1ECE4;
  --muted: #B3ABA0;
  --faint: #8C8378;
  --primary: #F1ECE4;
  --primary-text: #15130F;
  --accent: #E8814F;
  --accent-text: #15130F;
  --accent-soft: #2A1F1A;
  --plum: #B39BD6;
  --success: #7CC29A;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: 0; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0;
  margin-bottom: 10px;
}

/* 頁首 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand strong { font-family: var(--serif); font-size: 18px; display: block; line-height: 1.1; }
.brand small { font-size: 11px; color: var(--muted); display: block; line-height: 1.1; margin-top: 3px; }
.mainnav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.mainnav a {
  text-decoration: none; font-size: 14px; color: var(--muted);
  padding: 6px 10px; border-radius: 999px;
}
.mainnav a:hover, .mainnav a[aria-current="page"] { color: var(--text); background: var(--surface-alt); }
@media (max-width: 640px) {
  .mainnav a.secondary { display: none; }
}

/* 按鈕 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { opacity: 0.92; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--outline); }
.btn-secondary:hover { background: var(--surface-alt); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) {
  .hero { padding: 88px 0 64px; }
  .hero .wrap { grid-template-columns: 1.15fr 1fr; gap: 56px; }
}
.hero h1 { font-size: clamp(30px, 5.4vw, 48px); line-height: 1.28; }
.hero .lead { font-size: 18px; color: var(--muted); margin: 20px 0 28px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { font-size: 13px; color: var(--faint); margin-top: 14px; }

/* 通知卡：示意會前提醒 */
.phone-stack { display: grid; gap: 14px; max-width: 420px; margin: 0 auto; width: 100%; }
.notice {
  background: var(--surface); border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.notice .head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); margin-bottom: 6px; }
.notice .head img { width: 18px; height: 18px; border-radius: 5px; }
.notice .head span:last-child { margin-left: auto; }
.notice strong { display: block; font-size: 15px; margin-bottom: 2px; }
.notice p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.notice .ask { color: var(--accent); font-weight: 700; }
.memo { background: var(--surface-alt); border-color: transparent; box-shadow: none; }
.memo .quote { font-family: var(--serif); font-size: 15px; line-height: 1.7; margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.chip b { color: var(--text); font-weight: 700; margin-right: 4px; }
.chip.warn { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.chip.warn b { color: var(--accent); }

/* 區塊 */
section.block { padding: 56px 0; }
section.block + section.block { border-top: 1px solid var(--border); }
.block h2 { font-size: clamp(24px, 3.6vw, 32px); margin-bottom: 10px; }
.block .sub { color: var(--muted); max-width: 40em; margin-bottom: 32px; }

.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 22px 20px;
}
.step .num { font-family: var(--serif); font-size: 28px; color: var(--accent); line-height: 1; margin-bottom: 12px; }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.contrast { display: grid; gap: 12px; }
@media (min-width: 720px) { .contrast { grid-template-columns: repeat(3, 1fr); } }
.contrast div { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; }
.contrast div b { display: block; font-family: var(--serif); font-size: 17px; margin-bottom: 4px; }
.contrast div span { color: var(--muted); font-size: 15px; }

.promise { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .promise { grid-template-columns: repeat(2, 1fr); } }
.promise li { background: var(--surface-alt); border-radius: 14px; padding: 16px 18px; font-size: 15px; }
.promise li b { display: block; margin-bottom: 2px; }
.promise li span { color: var(--muted); }

.faq details { border-top: 1px solid var(--border); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700; display: flex; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--faint); font-weight: 400; font-size: 20px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 0 0 16px; max-width: 46em; }

.cta {
  background: var(--primary); color: var(--primary-text); border-radius: 24px; padding: 40px 24px; text-align: center;
}
.cta h2 { color: inherit; font-size: clamp(22px, 3.4vw, 30px); margin-bottom: 8px; }
.cta p { opacity: 0.8; margin-bottom: 22px; }
.cta .btn-primary { background: var(--accent); color: var(--accent-text); }

/* 文件頁 */
.page { padding: 40px 0 64px; }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(26px, 4.4vw, 36px); margin-bottom: 6px; }
.doc .updated { color: var(--faint); font-size: 14px; margin-bottom: 32px; }
.doc h2 { font-size: 21px; margin: 36px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.doc h2:first-of-type { border-top: 0; padding-top: 0; }
.doc h3 { font-size: 17px; margin: 20px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.4em; margin: 0 0 1em; }
.doc li { margin-bottom: 4px; }
.doc .callout {
  background: var(--accent-soft); border-radius: 14px; padding: 14px 18px; margin: 16px 0; font-size: 15px;
}
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 20px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.doc th { font-weight: 700; color: var(--muted); font-size: 13px; }
.doc code { background: var(--surface-alt); padding: 1px 6px; border-radius: 6px; font-size: 14px; }

.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; margin: 16px 0 28px;
  display: grid; gap: 10px;
}
.contact-card .row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.contact-card .label { font-size: 13px; color: var(--muted); min-width: 5em; }
.contact-card a { font-weight: 700; text-decoration: none; color: var(--accent); }

/* 頁尾 */
footer { border-top: 1px solid var(--border); padding: 36px 0 44px; font-size: 14px; color: var(--muted); }
footer .wrap { display: grid; gap: 18px; }
.foot-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.foot-brand img { width: 32px; height: 32px; border-radius: 8px; }
.foot-brand span { font-size: 13px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--text); }
footer .copy { font-size: 13px; color: var(--faint); margin: 0; }

.notfound { text-align: center; padding: 96px 0; }
.notfound h1 { font-size: 36px; margin-bottom: 12px; }

/* 資料處理者表格：手機上逐列堆疊 */
@media (max-width: 640px) {
  .doc table.processors thead { display: none; }
  .doc table.processors, .doc table.processors tbody, .doc table.processors tr, .doc table.processors td { display: block; width: 100%; }
  .doc table.processors tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .doc table.processors td { border: 0; padding: 4px 0; }
  .doc table.processors td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
  .doc table.processors td:first-child { font-weight: 700; }
}
