/* ── 健康文章 共用樣式表 ──────────────────────────────────────
   由「文章管理後台」產生的所有文章頁面共用此檔案。
   若要調整全站文章的視覺風格，只需改這裡，所有文章會一併更新。
   色彩沿用 main.css（首頁）的品牌色，維持全站一致。
──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:       #FAF7F0;
  --cream-deep:  #F3EDE2;
  --ivory:       #FFFDF9;
  --cocoa:       #4A4038;
  --cocoa-soft:  #857A6E;
  --taupe:       #A98D72;
  --taupe-deep:  #8A6F55;
  --taupe-mist:  #F0E8DB;
  --gold:        #C9AC80;
  --gold-soft:   #EFE5D2;
  --blush:       #E9DCD2;
  --rose:        #B87976;
  --rose-soft:   #F4E5E1;
  --sage:        #7D927C;
  --sage-soft:   #EDF2EA;
  --line:        #E9E0D0;
  --white:       #FFFFFF;
  --danger:      #C0392B;
  --danger-light:#FDF0EE;
  --font-display:'Noto Serif TC', serif;
  --font-body:   'Noto Sans TC', sans-serif;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 3px 16px rgba(105, 88, 66, 0.07);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 16.5px; line-height: 1.9; color: var(--cocoa); background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 360px); -webkit-font-smoothing: antialiased; }

/* ── Nav ── */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,253,249,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.site-nav-logo { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--cocoa); text-decoration: none; }
.site-nav-links { display: flex; gap: 20px; align-items: center; }
.site-nav-links a { font-size: 13px; color: var(--cocoa-soft); text-decoration: none; transition: color .15s; }
.site-nav-links a:hover { color: var(--taupe-deep); }
.site-nav-cta { background: var(--taupe); color: #fff !important; padding: 6px 14px; border-radius: 20px; font-weight: 500; }
.site-nav-cta:hover { background: var(--taupe-deep) !important; }
@media (max-width: 540px) { .site-nav-links .hide-mobile { display: none; } }

/* ── Hero ── */
.article-hero { background: linear-gradient(180deg, var(--ivory) 0%, #FBF3EF 100%); color: var(--cocoa); padding: 72px 24px 58px; text-align: left; position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.article-hero::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: linear-gradient(90deg, var(--rose) 0%, var(--gold) 42%, var(--sage) 100%); opacity: .82; }
.article-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 1px; background: var(--white); opacity: .8; }
.article-hero > * { max-width: 712px; margin-left: auto; margin-right: auto; }

/* ── Breadcrumbs（置於 hero 頂部，沿用 hero 的低調文字色） ── */
.article-breadcrumbs { position: relative; font-size: 12.5px; letter-spacing: 0; color: var(--cocoa-soft); margin-bottom: 22px; }
.article-breadcrumbs a { color: var(--taupe-deep); text-decoration: none; }
.article-breadcrumbs a:hover { color: var(--gold); text-decoration: underline; }
.article-breadcrumbs .sep { margin: 0 8px; color: var(--taupe); }

.article-hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0; color: var(--rose); background: rgba(255,255,255,.72); border: 1px solid rgba(184,121,118,.22); border-radius: 999px; padding: 5px 12px; margin-bottom: 18px; position: relative; }
.article-hero-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.article-hero h1 { font-family: var(--font-display); font-size: 42px; font-weight: 700; line-height: 1.22; letter-spacing: 0; text-wrap: pretty; word-break: normal; line-break: strict; overflow-wrap: break-word; color: var(--cocoa); margin-top: 0; margin-bottom: 20px; position: relative; }
.article-title-primary { display: block; }
.article-title-secondary { display: block; max-width: 640px; margin-top: 12px; color: var(--cocoa-soft); font-family: var(--font-body); font-size: .5em; font-weight: 500; line-height: 1.6; letter-spacing: .01em; }
.article-hero h1::after { content: ''; display: block; width: 92px; height: 3px; margin-top: 22px; border-radius: 999px; background: linear-gradient(90deg, var(--rose), var(--gold), var(--sage)); }
.article-hero-subtitle { font-family: var(--font-display); font-size: 18px; color: #6C5E52; max-width: 700px; margin-top: 0; margin-bottom: 28px; line-height: 1.9; position: relative; }
.article-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.article-hero-tag { background: rgba(255,255,255,.68); border: 1px solid var(--line); color: var(--taupe-deep); font-size: 12.5px; padding: 4px 12px; border-radius: 999px; }
.article-hero-meta { margin-top: 18px; font-size: 12.5px; color: var(--cocoa-soft); position: relative; }

/* ── Layout ── */
.article-container { max-width: 760px; margin: 0 auto; padding: 48px 24px 0; }

/* ── TOC ── */
.article-toc { background: var(--ivory); border: 1px solid var(--line); border-left: 4px solid var(--rose); border-radius: 8px; padding: 22px 26px; margin: 0 0 42px; box-shadow: var(--shadow); }
.article-toc-title { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--rose); letter-spacing: 0; margin-bottom: 14px; }
.article-toc ol { padding-left: 20px; }
.article-toc li { margin-bottom: 6px; }
.article-toc a { color: var(--cocoa-soft); text-decoration: none; font-size: 14.5px; line-height: 1.65; }
.article-toc a:hover { color: var(--taupe-deep); }

.article-section { margin-bottom: 24px; }
.article-section h2 { font-family: var(--font-display); font-size: 27px; font-weight: 700; color: var(--cocoa); line-height: 1.42; letter-spacing: 0; text-wrap: pretty; word-break: auto-phrase; line-break: loose; overflow-wrap: break-word; margin: 52px 0 18px; padding: 0; scroll-margin-top: 92px; position: relative; }
.article-section h2::after { content: ''; display: block; width: 88px; height: 2px; margin-top: 7px; border-radius: 999px; background: linear-gradient(90deg, var(--rose), var(--gold)); }
.article-section h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--cocoa); line-height: 1.5; letter-spacing: 0; margin: 32px 0 12px; }
.article-section p { margin-bottom: 17px; color: var(--cocoa-soft); }
.article-section p strong { color: var(--cocoa); font-weight: 700; }
.article-section a {
  color: var(--rose);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 121, 118, 0.34);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.article-section a:hover {
  color: var(--taupe-deep);
  border-bottom-color: currentColor;
  background: rgba(244, 229, 225, 0.45);
}
.article-section a:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-bottom-color: transparent;
}

/* ── Lead（直接答案框，方便搜尋引擎與 AI 摘要擷取） ── */
.a-lead { background: linear-gradient(180deg, var(--ivory), #FFF8F5); border: 1px solid var(--line); border-left: 4px solid var(--rose); border-radius: 8px; padding: 24px 28px; margin-bottom: 34px; font-size: 17px; line-height: 1.9; color: var(--cocoa-soft); }
.a-lead strong { color: var(--taupe-deep); }
.a-lead-eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0; color: var(--rose); margin-bottom: 10px; }

/* ── Info box ── */
.a-info { background: var(--taupe-mist); border-left: 3px solid var(--taupe); border-radius: 0 8px 8px 0; padding: 18px 22px; margin: 20px 0; }
.a-info-title { font-size: 13px; font-weight: 700; color: var(--taupe-deep); margin-bottom: 6px; }
.a-info-text { font-size: 14px; color: #4A3A24; line-height: 1.8; }

/* ── Warning box ── */
.a-warning { background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; padding: 18px 22px; margin: 20px 0; }
.a-warning-title { font-size: 13px; font-weight: 700; color: #7A5E14; margin-bottom: 6px; }
.a-warning-text { font-size: 14px; color: #5C4500; line-height: 1.8; }

/* ── Alert (紅色警示，語意色不隨品牌變) ── */
.a-alert { background: var(--danger-light); border: 1.5px solid var(--danger); border-radius: 10px; padding: 20px 24px; margin: 24px 0; }
.a-alert-title { font-size: 13px; font-weight: 700; color: var(--danger); letter-spacing: .04em; margin-bottom: 12px; }
.a-alert ul { list-style: none; }
.a-alert li { padding: 6px 0 6px 24px; position: relative; color: #7A1A10; font-size: 14px; font-weight: 500; }
.a-alert li::before { content: '⚠'; position: absolute; left: 0; font-size: 13px; }

/* ── Checklist ── */
.a-checklist { list-style: none; margin: 16px 0; }
.a-checklist li { padding: 8px 0 8px 28px; position: relative; color: var(--cocoa-soft); font-size: 15px; border-bottom: 1px solid var(--line); }
.a-checklist li:last-child { border-bottom: none; }
.a-checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--taupe-deep); font-weight: 700; }

/* ── Plain list ── */
.a-list { list-style: none; margin: 16px 0; }
.a-list li { padding: 6px 0 6px 20px; position: relative; color: var(--cocoa-soft); font-size: 15px; line-height: 1.75; }
.a-list li::before { content: '•'; position: absolute; left: 2px; color: var(--taupe); font-weight: 700; }

/* ── Table ── */
.a-table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 10px; }
.a-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.a-table th, .a-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.a-table th { background: var(--taupe-mist); color: var(--taupe-deep); font-weight: 700; white-space: nowrap; }
.a-table tbody tr:last-child td { border-bottom: none; }
.a-table tbody tr:nth-child(even) { background: var(--cream-deep); }

/* ── FAQ ── */
.a-faq { margin: 8px 0; }
.a-faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.a-faq-item:first-child { padding-top: 0; }
.a-faq-item:last-child { border-bottom: none; }
.a-faq-q { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--cocoa); margin-bottom: 8px; }
.a-faq-q::before { content: 'Q. '; color: var(--taupe-deep); }
.a-faq-a { font-size: 14.5px; color: var(--cocoa-soft); line-height: 1.85; }
.a-faq-a::before { content: 'A. '; font-weight: 700; color: var(--taupe); }

/* ── Quote ── */
.a-quote { border-left: 3px solid var(--taupe); padding: 16px 20px; margin: 24px 0; background: var(--taupe-mist); border-radius: 0 8px 8px 0; }
.a-quote p { font-family: var(--font-display); font-size: 16px; color: var(--cocoa); font-weight: 600; margin-bottom: 6px !important; }
.a-quote cite { font-size: 12px; color: var(--taupe-deep); font-style: normal; letter-spacing: .05em; }

/* ── Comparison (兩欄對照) ── */
.a-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
@media (max-width: 520px) { .a-comparison { grid-template-columns: 1fr; } }
.a-comp-card { border-radius: 10px; padding: 18px; }
.a-comp-card.left { background: var(--cream-deep); border: 1px solid var(--line); }
.a-comp-card.right { background: var(--taupe-mist); border: 1px solid var(--gold); }
.a-comp-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.a-comp-card.left .a-comp-label { color: var(--cocoa-soft); }
.a-comp-card.right .a-comp-label { color: var(--taupe-deep); }
.a-comp-card ul { list-style: none; }
.a-comp-card ul li { font-size: 13px; color: var(--cocoa-soft); padding: 4px 0 4px 16px; position: relative; }
.a-comp-card ul li::before { content: '·'; position: absolute; left: 4px; font-weight: 700; }

/* ── References（可收合） ── */
.a-references { background: var(--cream-deep); border: 1px solid var(--line); border-radius: 10px; padding: 4px 24px; margin-top: 40px; }
.a-references summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 16px 0; font-size: 13px; font-weight: 700; color: var(--cocoa-soft); letter-spacing: .06em; text-transform: uppercase; user-select: none; }
.a-references summary::-webkit-details-marker { display: none; }
.a-references summary::marker { content: ''; }
.a-references summary:hover { color: var(--taupe-deep); }
.a-references summary::after { content: '▾'; margin-left: auto; font-size: 11px; color: var(--taupe); transition: transform .2s ease; }
.a-references[open] summary::after { transform: rotate(180deg); }
.a-ref-count { font-size: 10.5px; font-weight: 600; color: var(--taupe-deep); text-transform: none; letter-spacing: 0; background: var(--gold-soft); padding: 2px 9px; border-radius: 999px; }
.a-references ol { padding: 0 0 18px 18px; margin: 0; }
.a-references li { font-size: 12px; color: var(--cocoa-soft); line-height: 1.7; margin-bottom: 6px; }
.a-references li:last-child { margin-bottom: 0; }

/* ── CTA ── */
.a-cta { background: linear-gradient(135deg, var(--cocoa) 0%, #34291F 100%); border-radius: 16px; padding: 40px 32px; text-align: center; margin: 48px 0 32px; color: #fff; }
.a-cta h3 { font-family: var(--font-display); font-size: 22px; color: #fff; margin-bottom: 12px; }
.a-cta p { color: var(--gold-soft); font-size: 15px; margin-bottom: 24px; white-space: nowrap; }
.a-cta-btn { display: inline-block; background: #fff; color: var(--cocoa); font-weight: 600; font-size: 15px; padding: 12px 32px; border-radius: 30px; text-decoration: none; transition: transform .15s; }
.a-cta-btn:hover { transform: translateY(-2px); }

/* ── Author box（文末作者簡介） ── */
.article-authorbox { display: flex; gap: 16px; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin: 40px 0; }
.article-authorbox img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex: none; }
.article-authorbox h4 { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--cocoa); margin-bottom: 6px; }
.article-authorbox p { font-size: 13.5px; color: var(--cocoa-soft); line-height: 1.8; margin: 0; }
.article-authorbox a { color: var(--taupe-deep); font-weight: 600; text-decoration: none; }
.article-authorbox a:hover { text-decoration: underline; }

/* ── Related articles（相關文章） ── */
.article-related { margin: 8px 0 8px; }
.article-related h4 { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--cocoa); margin-bottom: 16px; }
.article-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.article-related-card { display: block; background: var(--cream-deep); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; text-decoration: none; transition: transform .2s, border-color .2s; }
.article-related-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.article-related-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--taupe-deep); background: var(--gold-soft); padding: 2px 9px; border-radius: 999px; margin-bottom: 8px; }
.article-related-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--cocoa); line-height: 1.5; margin-bottom: 6px; }
.article-related-excerpt { font-size: 12.5px; color: var(--cocoa-soft); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Disclaimer & footer ── */
.article-disclaimer { font-size: 12px; color: var(--cocoa-soft); border-top: 1px solid var(--line); padding-top: 20px; margin: 20px 0 60px; line-height: 1.7; }

@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.88; }
  .article-hero { padding: 48px 16px 42px; }
  .article-hero h1 { font-size: 30px; line-height: 1.28; }
  .article-title-secondary { margin-top: 9px; font-size: .58em; line-height: 1.55; }
  .article-hero h1::after { width: 76px; margin-top: 18px; }
  .article-hero-subtitle { font-family: var(--font-body); font-size: 15.8px; line-height: 1.82; }
  .article-hero-tags { gap: 6px; }
  .article-hero-tag { font-size: 12px; padding: 3px 10px; }
  .article-container { padding: 32px 16px 0; }
  .article-toc { padding: 18px 20px; margin-bottom: 34px; }
  .article-section h2 { margin-top: 42px; font-size: 23px; line-height: 1.45; }
  .article-section h2::after { margin-top: 6px; }
  .article-section h3 { font-size: 18.5px; }
  .a-lead { padding: 20px; font-size: 16px; }
  .a-cta { padding: 28px 20px; }
  .a-cta p { white-space: normal; font-size: 13.5px; }
  .article-authorbox { flex-direction: column; }
}
