/* ===========================================================
   OTshih.com — 文章頁共用樣式 v1.0
   品牌 CIS：Jet Black / Olive Bark / Deep Walnut / Khaki Beige / Cream
   =========================================================== */
:root {
  --jet-black: #13262F;
  --olive-bark: #73683B;
  --deep-walnut: #583E23;
  --khaki-beige: #B0A084;
  --lavender: #E9E6FF;
  --paper: #FAF8F2;
  --cream: #F2EDE2;
  --card: #FDFBF5;
  --line: rgba(115, 104, 59, 0.18);
  --line-soft: rgba(115, 104, 59, 0.10);
  --serif-tc: 'Noto Serif TC', serif;
  --sans-en: 'DM Sans', sans-serif;
  --sans-tc: 'Noto Sans TC', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, table { margin: 0; padding: 0; }
body {
  font-family: var(--sans-tc), var(--sans-en);
  color: var(--jet-black);
  background: var(--paper);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ---------- NAV ---------- */
nav.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 242, 0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: box-shadow 0.3s ease;
}
nav.topbar.scrolled { box-shadow: 0 2px 16px rgba(19, 38, 47, 0.06); border-bottom-color: rgba(115, 104, 59, 0.15); }
nav.topbar .container { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-family: var(--serif-tc); font-weight: 900; font-size: 20px; letter-spacing: 0.04em; }
.brand-sub { font-family: var(--sans-en); font-size: 10px; letter-spacing: 0.25em; color: var(--olive-bark); text-transform: uppercase; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-size: 14px; position: relative; transition: color 0.2s; }
.nav-links a:hover { color: var(--olive-bark); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 1px; background: var(--olive-bark); transition: width 0.3s; }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--olive-bark); font-weight: 500; }
.nav-links a.active::after { width: 100%; }
.nav-cta { padding: 10px 22px; background: var(--jet-black); color: var(--lavender); font-size: 14px; border-radius: 100px; transition: all 0.2s; }
.nav-cta:hover { background: var(--olive-bark); transform: translateY(-1px); }
@media (max-width: 880px) { .nav-links { display: none; } }

.eyebrow {
  display: inline-block; font-family: var(--sans-en); font-size: 11px;
  letter-spacing: 0.3em; color: var(--olive-bark); text-transform: uppercase; margin-bottom: 14px;
}

/* ---------- 文章頭 ---------- */
.breadcrumb {
  font-size: 12.5px; color: rgba(19, 38, 47, 0.5);
  padding: 22px 0 0; display: flex; gap: 8px; flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--olive-bark); text-decoration: underline; }
.breadcrumb span { color: var(--khaki-beige); }

.article-head { padding: 30px 0 40px; }
.article-head .wrap { max-width: 760px; margin: 0 auto; }
.tag-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.tag {
  font-size: 12px; letter-spacing: 0.08em; padding: 5px 14px; border-radius: 100px;
  border: 1px solid var(--line); color: var(--olive-bark); background: var(--card);
}
.tag.audience-c { background: var(--olive-bark); color: #FFF; border-color: var(--olive-bark); }
.tag.audience-b { background: var(--jet-black); color: var(--lavender); border-color: var(--jet-black); }
h1.article-h1 {
  font-family: var(--serif-tc); font-weight: 900; font-size: 38px;
  line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 18px;
}
.article-lede { font-size: 17px; line-height: 1.9; color: rgba(19, 38, 47, 0.72); margin-bottom: 26px; }
.byline {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: rgba(19, 38, 47, 0.55);
  padding-top: 20px; border-top: 1px solid var(--line-soft);
}
.byline strong { color: var(--jet-black); font-weight: 500; }
.byline .dot { width: 3px; height: 3px; background: var(--khaki-beige); border-radius: 100px; }
.cover-figure { max-width: 940px; margin: 0 auto 52px; }
.cover-figure img { border-radius: 4px; }
.cover-figure figcaption { font-size: 12.5px; color: rgba(19, 38, 47, 0.5); margin-top: 10px; text-align: center; }

/* ---------- 首刊來源條 ---------- */
.origin-note {
  max-width: 760px; margin: 0 auto 44px; padding: 16px 22px;
  background: var(--cream); border-left: 3px solid var(--olive-bark);
  font-size: 14px; line-height: 1.8; color: rgba(19, 38, 47, 0.75);
}
.origin-note a { color: var(--olive-bark); text-decoration: underline; font-weight: 500; }

/* ---------- 正文排版 ---------- */
.prose { max-width: 760px; margin: 0 auto; font-size: 17px; line-height: 1.95; }
.prose > p { margin-bottom: 26px; }
.prose h2 {
  font-family: var(--serif-tc); font-weight: 900; font-size: 26px; line-height: 1.5;
  margin: 56px 0 20px; padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.prose h3 { font-family: var(--serif-tc); font-weight: 900; font-size: 20px; margin: 36px 0 14px; }
.prose strong { font-weight: 700; color: var(--deep-walnut); }
.prose a.inline { color: var(--olive-bark); text-decoration: underline; }
.prose ul.bullet { margin: 0 0 26px; padding-left: 4px; }
.prose ul.bullet li { position: relative; padding-left: 22px; margin-bottom: 12px; }
.prose ul.bullet li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 6px; height: 6px; background: var(--khaki-beige); border-radius: 100px; }
.prose ol.steps { counter-reset: s; margin: 0 0 26px; }
.prose ol.steps li { counter-increment: s; position: relative; padding-left: 42px; margin-bottom: 18px; }
.prose ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 3px;
  width: 26px; height: 26px; border-radius: 100px; background: var(--olive-bark); color: #FFF;
  font-family: var(--sans-en); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.prose figure { margin: 36px 0; }
.prose figure img { border-radius: 4px; border: 1px solid var(--line-soft); }
.prose figcaption { font-size: 13px; color: rgba(19, 38, 47, 0.55); margin-top: 10px; }
.prose blockquote {
  margin: 36px 0; padding: 26px 30px; background: var(--card);
  border: 1px solid var(--line-soft); border-left: 3px solid var(--deep-walnut);
  font-family: var(--serif-tc); font-weight: 600; font-size: 19px; line-height: 1.8;
}

/* 表格 */
.table-wrap { overflow-x: auto; margin: 30px 0; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; background: var(--card); }
.prose th, .prose td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; line-height: 1.75; }
.prose th { background: var(--jet-black); color: var(--lavender); font-weight: 500; font-size: 14px; letter-spacing: 0.03em; }
.prose tbody tr:last-child td { border-bottom: none; }
.prose tbody tr:nth-child(even) { background: rgba(242, 237, 226, 0.5); }
.prose td strong { color: var(--deep-walnut); }

/* 重點盒 */
.callout {
  margin: 36px 0; padding: 26px 30px; background: var(--cream);
  border: 1px solid var(--line); border-radius: 4px;
}
.callout h4 {
  font-family: var(--serif-tc); font-weight: 900; font-size: 18px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.callout h4::before { content: ""; width: 18px; height: 2px; background: var(--olive-bark); display: block; }
.callout p { font-size: 15.5px; line-height: 1.9; margin-bottom: 12px; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: rgba(88, 62, 35, 0.06); border-color: rgba(88, 62, 35, 0.25); }

/* 自我檢測卡 */
.selftest { margin: 40px 0; padding: 32px; background: var(--jet-black); color: var(--lavender); border-radius: 4px; }
.selftest .eyebrow { color: var(--khaki-beige); }
.selftest h4 { font-family: var(--serif-tc); font-weight: 900; font-size: 22px; margin-bottom: 16px; color: #FFF; }
.selftest p { font-size: 15px; line-height: 1.9; color: rgba(233, 230, 255, 0.8); margin-bottom: 14px; }
.selftest p strong { color: #FFF; font-weight: 700; }
.selftest table { background: transparent; min-width: 420px; }
.selftest th { background: rgba(233, 230, 255, 0.12); color: #FFF; }
.selftest td { color: rgba(233, 230, 255, 0.85); border-bottom-color: rgba(233, 230, 255, 0.14); }
.selftest tbody tr:nth-child(even) { background: rgba(233, 230, 255, 0.04); }
.selftest td strong { color: #FFF; }

/* ---------- 參考文獻（可折疊） ---------- */
.refs { max-width: 760px; margin: 56px auto 0; }
.refs details {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 4px; padding: 0 26px;
}
.refs summary {
  cursor: pointer; padding: 18px 0; font-size: 15px; font-weight: 500; color: var(--olive-bark);
  list-style: none; display: flex; align-items: center; gap: 10px;
}
.refs summary::-webkit-details-marker { display: none; }
.refs summary::after { content: "＋"; margin-left: auto; font-size: 14px; }
.refs details[open] summary::after { content: "－"; }
.refs .refs-body { padding: 6px 0 24px; border-top: 1px solid var(--line-soft); }
.refs .refs-body p, .refs .refs-body li {
  font-size: 13px; line-height: 1.85; color: rgba(19, 38, 47, 0.68);
  margin-bottom: 12px; padding-left: 18px; text-indent: -18px;
}
.refs .refs-body h5 { font-size: 14px; margin: 18px 0 10px; color: var(--jet-black); }

/* ---------- 作者卡 ---------- */
.author-card {
  max-width: 760px; margin: 56px auto 0; padding: 30px; background: var(--card);
  border: 1px solid var(--line-soft); border-radius: 4px;
  display: grid; grid-template-columns: 92px 1fr; gap: 24px; align-items: start;
}
.author-card img { width: 92px; height: 92px; object-fit: cover; border-radius: 100px; }
.author-card h4 { font-family: var(--serif-tc); font-weight: 900; font-size: 19px; margin-bottom: 8px; }
.author-card p { font-size: 14px; line-height: 1.85; color: rgba(19, 38, 47, 0.7); margin-bottom: 12px; }
.author-card a { font-size: 14px; color: var(--olive-bark); text-decoration: underline; }
@media (max-width: 640px) { .author-card { grid-template-columns: 1fr; } }

/* ---------- 文末 CTA ---------- */
.article-cta { margin-top: 72px; padding: 64px 0; background: var(--cream); border-top: 1px solid var(--line-soft); }
.cta-card { max-width: 760px; margin: 0 auto; text-align: center; }
.cta-card .eyebrow { margin-bottom: 12px; }
.cta-card h3 { font-family: var(--serif-tc); font-weight: 900; font-size: 28px; line-height: 1.5; margin-bottom: 14px; }
.cta-card p { font-size: 15.5px; line-height: 1.9; color: rgba(19, 38, 47, 0.72); margin-bottom: 26px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 34px;
  background: var(--jet-black); color: var(--lavender); border-radius: 100px;
  font-size: 15px; transition: all 0.2s;
}
.btn-primary:hover { background: var(--olive-bark); transform: translateY(-2px); }
.btn-primary::after { content: "→"; transition: transform 0.2s; }
.btn-primary:hover::after { transform: translateX(4px); }
.cta-note { font-size: 13px; color: rgba(19, 38, 47, 0.55); margin-top: 18px; }
.cta-note a { color: var(--olive-bark); text-decoration: underline; }

/* ---------- 相關文章 ---------- */
.related { padding: 64px 0 80px; }
.related h3 { font-family: var(--serif-tc); font-weight: 900; font-size: 22px; margin-bottom: 26px; text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1000px; margin: 0 auto; }
.related-card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 4px;
  padding: 22px; transition: all 0.25s; display: flex; flex-direction: column;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(19, 38, 47, 0.08); border-color: var(--olive-bark); }
.related-card .rc-tag { font-size: 11px; letter-spacing: 0.16em; color: var(--olive-bark); text-transform: uppercase; margin-bottom: 10px; }
.related-card h4 { font-family: var(--serif-tc); font-weight: 900; font-size: 16.5px; line-height: 1.55; margin-bottom: 10px; }
.related-card p { font-size: 13.5px; line-height: 1.75; color: rgba(19, 38, 47, 0.65); }
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr; } }

/* ---------- FOOTER ---------- */
footer { background: var(--jet-black); color: rgba(233, 230, 255, 0.45); padding: 28px 0; text-align: center; font-size: 12px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: center; }
.footer-right { font-family: var(--sans-en); letter-spacing: 0.1em; }
@media (max-width: 700px) { .footer-grid { justify-content: center; } }

/* ---------- 手機 ---------- */
@media (max-width: 700px) {
  .container { padding: 0 20px; }
  h1.article-h1 { font-size: 28px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 22px; margin-top: 44px; }
  .cta-card h3 { font-size: 23px; }
  .selftest, .callout, .prose blockquote { padding: 22px; }
}
