/* ============================================================
   The Social Confession — TSC
   品牌視覺：溫潤紙感底色、墨色文字、酒紅／暖金點綴
   繁中襯線標題 + 無襯線正文
   ============================================================ */

:root {
  --paper: #faf7f2;
  --paper-2: #f3ede3;
  --ink: #1f2430;
  --ink-soft: #3a4150;
  --muted: #6b7280;
  --line: #e2d9cc;
  --brand: #7c2d2d;        /* 酒紅 — 品牌主色，用於標題線、連結 */
  --brand-2: #b08d57;      /* 暖金 — 點綴、強調 */
  --surface: #ffffff;
  --maxw: 760px;
  --maxw-wide: 1080px;
  --serif: "Songti TC", "Noto Serif TC", "Noto Serif HK", Georgia, "Times New Roman", serif;
  --sans: "PingFang TC", "Noto Sans TC", "Noto Sans HK", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img { max-width: 100%; height: auto; }

/* ---------- 頂部導航 ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .3px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex: 0 0 auto;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 15px;
}
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--brand); text-decoration: none; }

/* ---------- 通用排版 ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 24px; }

main { padding: 48px 0 64px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: 34px; margin: 0 0 18px; }
h2 { font-size: 26px; margin: 40px 0 16px; }
h3 { font-size: 20px; margin: 28px 0 12px; }
h4 { font-size: 17px; margin: 20px 0 10px; }

p { margin: 0 0 18px; }
.lead { font-size: 19px; color: var(--ink-soft); }

.section-eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brand-2);
  font-weight: 700;
  margin: 0 0 8px;
}

/* ---------- 首頁 hero ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 300px at 80% -10%, rgba(176,141,87,.12), transparent 60%),
    var(--surface);
  padding: 64px 0 56px;
}
.hero .hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { font-size: 44px; line-height: 1.18; max-width: 14em; }
.hero .lead { max-width: 32em; }
.hero .accent-line {
  width: 64px; height: 4px; background: var(--brand); border-radius: 2px; margin: 22px 0 26px;
}
.hero .hero-art { width: 100%; max-width: 460px; margin-left: auto; }
.hero .hero-art img { width: 100%; height: auto; display: block; }

/* ---------- 欄目卡片 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(31,36,48,.08); border-color: var(--brand-2); text-decoration: none; }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .tag { font-size: 12px; color: var(--brand-2); letter-spacing: 1px; }

/* ---------- 故事卡片（列表） ---------- */
.story-list { display: grid; gap: 0; }
.story-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.story-row .meta { font-size: 13px; color: var(--muted); }
.story-row .meta .col { color: var(--brand-2); font-weight: 700; letter-spacing: 1px; }
.story-row h3 { margin: 0 0 6px; font-size: 21px; }
.story-row h3 a { color: var(--ink); }
.story-row h3 a:hover { color: var(--brand); text-decoration: none; }
.story-row p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- 文章頁 ---------- */
.article-header { border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 8px; }
.article-header .col-tag { color: var(--brand-2); font-weight: 700; letter-spacing: 2px; font-size: 13px; }
.article-header h1 { margin: 10px 0 14px; }
.deck { font-size: 20px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 22px; }
.byline { font-size: 14px; color: var(--muted); }
.byline strong { color: var(--ink-soft); font-weight: 600; }

.article-body { font-size: 18px; }
.article-body h2 { border-left: 4px solid var(--brand); padding-left: 14px; }
.article-body blockquote {
  margin: 24px 0;
  padding: 14px 22px;
  background: var(--paper-2);
  border-left: 4px solid var(--brand-2);
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink-soft);
}

/* 投稿背景資料卡 */
.factcard {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 28px 0;
}
.factcard h4 { margin: 0 0 12px; color: var(--brand); font-family: var(--sans); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.factcard dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.factcard dt { color: var(--muted); }
.factcard dd { margin: 0; color: var(--ink-soft); }

/* 資料依據披露句 */
.disclosure {
  margin: 36px 0 0;
  padding: 16px 20px;
  background: #fff8e1;            /* 淺黃 — 資料依據標示 */
  border: 1px solid #ecd9a0;
  border-radius: 10px;
  font-size: 14.5px;
  color: #6b5a2e;
}

/* 文章圖片 */
.article-figure { margin: 28px 0; }
.article-figure img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }

/* 目錄導覽 */
.toc {
  margin: 28px 0;
  padding: 14px 18px;
  background: var(--paper-2);
  border-left: 4px solid var(--brand-2);
  border-radius: 0 10px 10px 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.toc a { margin: 0 2px; }

/* 表格（手機可橫向捲動） */
.table-wrap { overflow-x: auto; margin: 18px 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 480px;
}
.article-body th, .article-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.article-body thead th { background: var(--paper-2); color: var(--ink); }
.article-body tbody tr:nth-child(even) { background: var(--paper); }

/* 參考資料 */
.references { margin-top: 36px; }
.references h2 { font-size: 20px; }

/* ---------- 頁尾 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 36px 0;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .container-wide { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--ink-soft); }
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- 呼籲投稿 ---------- */
.cta {
  margin: 40px 0 0;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 30px 28px;
}
.cta h2 { color: #fff; margin-top: 0; }
.cta p { color: rgba(255,255,255,.82); }
.cta a.btn {
  display: inline-block;
  background: var(--brand-2);
  color: #1f2430;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  margin-top: 8px;
}
.cta a.btn:hover { text-decoration: none; background: #c9a268; }

/* ---------- 方法頁步驟 ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; margin-top: 18px; }
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: start;
}
.step .num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--brand);
}
.step h3 { margin: 4px 0 6px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* ---------- 響應式 ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 44px 0 40px; }
  .hero .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero .hero-art { max-width: 340px; margin: 0 auto; order: 2; }
  .hero h1 { font-size: 32px; }
  h1 { font-size: 28px; }
  .story-row { grid-template-columns: 1fr; gap: 8px; }
  .nav-links { gap: 14px; font-size: 14px; }
  .factcard dl { grid-template-columns: 90px 1fr; }
}

.skip-link { position: absolute; left: -999px; }
