/* ============================================================
   SKH Knowledge Article Shared Styles
   knowledge 9 篇文章共用版型 — 引用 global-tokens.css 之後載入
   建立日期：2026-06-29
   ============================================================ */

/* ─────────────────────────────────────────────
   1. ARTICLE BASE 文章基礎
   ───────────────────────────────────────────── */

h1, h2, h3, .serif-font {
  font-family: var(--font-display);
  line-height: var(--leading-normal);
}

.text-gradient-on-light {
  background: linear-gradient(135deg, var(--color-brand), var(--color-brand-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-stroke-huge {
  font-size: 8rem;
  font-weight: 900;
  line-height: var(--leading-none);
  -webkit-text-stroke: 2px rgba(227, 127, 127, 0.05);
  color: transparent;
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
@media (min-width: 768px) {
  .text-stroke-huge { font-size: 15rem; }
}


/* ─────────────────────────────────────────────
   2. HERO SECTION
   ───────────────────────────────────────────── */

.hero-section {
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}


/* ─────────────────────────────────────────────
   3. CLEAN CARD 通用卡片
   ───────────────────────────────────────────── */

.clean-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: var(--border-light);
  transition: all 0.35s var(--ease-default);
  position: relative;
  z-index: 1;
}

.clean-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-brand-a20);
}


/* ─────────────────────────────────────────────
   4. DR. VOICE CARD 醫師觀點卡片
   ───────────────────────────────────────────── */

.dr-voice-card {
  background: var(--color-brand-light);
  border-radius: var(--radius-section) var(--radius-card) var(--radius-card) var(--radius-section);
  border-left: 6px solid var(--color-brand);
  padding: 1.75rem 2rem;
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}

.dr-voice-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: var(--shadow-brand-soft);
}

.dr-voice-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-brand);
  display: block;
  margin-bottom: 0.6rem;
}

.dr-voice-card p {
  font-style: italic;
  color: var(--color-slate-600);
  line-height: var(--leading-loose);
  margin: 0 0 0.75rem;
  font-size: var(--text-base);
}

.dr-voice-card p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .dr-voice-card {
    flex-direction: column;
    gap: var(--space-lg);
  }
}


/* ─────────────────────────────────────────────
   5. PERSONA CARD 受眾卡片
   ───────────────────────────────────────────── */

.persona-card {
  background: var(--color-surface);
  border-radius: 1.25rem;
  border: var(--border-light);
  padding: var(--space-3xl);
  transition: var(--transition-slow);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.persona-card:hover {
  border-color: var(--color-brand-a30);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.persona-card.featured {
  background: linear-gradient(135deg, var(--color-brand-light) 0%, var(--color-surface) 100%);
  border: 2px solid var(--color-brand);
  box-shadow: 0 12px 32px -8px var(--color-brand-a15);
}

.persona-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  color: var(--color-brand);
  background: var(--color-brand-light);
  padding: 0.3rem 0.85rem;
  border-radius: 0.5rem;
  margin-bottom: var(--space-lg);
  align-self: flex-start;
}

.persona-card.featured .persona-tag {
  background: var(--color-brand);
  color: white;
}

.persona-arrow {
  color: var(--color-brand);
  font-weight: 700;
  margin: 0.75rem 0;
}

.persona-empathy {
  background: var(--color-brand-light);
  border-left: 3px solid var(--color-brand);
  border-radius: 0 0.75rem 0.75rem 0;
  padding: var(--space-lg) var(--space-xl);
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-slate-600);
  line-height: 1.75;
}


/* ─────────────────────────────────────────────
   6. MYTH CARD 迷思破解卡片
   ───────────────────────────────────────────── */

.myth-card {
  background: var(--color-surface);
  border-radius: 1.25rem;
  border: var(--border-light);
  padding: 1.75rem 2rem;
  margin-bottom: var(--space-lg);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.04);
  transition: var(--transition-slow);
}

.myth-card:hover {
  border-color: var(--color-brand-a30);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

.myth-tag,
.myth-no {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
}


/* ─────────────────────────────────────────────
   7. TERM TOOLTIP 名詞解釋彈窗
   ───────────────────────────────────────────── */

.term-tooltip {
  position: relative;
  display: inline;
  color: var(--color-brand-dark);
  font-weight: 700;
  border-bottom: 1.5px dashed var(--color-brand);
  cursor: help;
}

.term-tooltip .term-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  max-width: 360px;
  background: var(--color-surface);
  color: var(--color-slate-700);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-brand);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base), visibility var(--duration-base), transform var(--duration-base);
  z-index: 50;
  pointer-events: none;
  text-align: left;
}

.term-tooltip .term-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: var(--color-brand) transparent transparent transparent;
}

.term-tooltip .term-popup::before {
  content: '';
  position: absolute;
  top: calc(100% - 1.5px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: var(--color-surface) transparent transparent transparent;
  z-index: 1;
}

.term-tooltip .term-popup strong {
  display: block;
  color: var(--color-brand-dark);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: var(--tracking-normal);
}

.term-tooltip:hover .term-popup,
.term-tooltip:focus .term-popup,
.term-tooltip.is-active .term-popup {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 640px) {
  .term-tooltip .term-popup {
    min-width: 240px;
    max-width: 280px;
    font-size: var(--text-sm);
  }
}


/* ─────────────────────────────────────────────
   8. FAQ ACCORDION 常見問題
   ───────────────────────────────────────────── */

.faq-item {
  background: var(--color-surface);
  border-radius: var(--radius-section);
  border: var(--border-light);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow var(--duration-slow), border-color var(--duration-slow);
}

.faq-item:hover {
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.08);
  border-color: var(--color-brand-a20);
}

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] summary ~ * {
  animation: sweep var(--duration-base) ease;
}

@keyframes sweep {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  cursor: pointer;
  padding: 1.4rem 1.75rem;
  user-select: none;
}

.faq-q {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-slate-950);
  line-height: 1.55;
  flex: 1;
}

.faq-num {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-brand-dark);
  flex-shrink: 0;
}

.faq-chevron {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-slate-50);
  color: var(--color-slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all var(--duration-base);
  margin-top: 2px;
}

details[open] .faq-chevron {
  background: var(--color-brand);
  color: #fff;
  transform: rotate(180deg);
}

details:hover .faq-chevron {
  background: var(--color-brand-light);
  color: var(--color-brand);
}

details[open]:hover .faq-chevron {
  background: var(--color-brand);
  color: #fff;
}

.faq-answer {
  padding: 0 1.75rem 1.75rem;
  font-size: var(--text-base);
  color: var(--color-slate-600);
  line-height: var(--leading-loose);
}

.faq-answer p { margin-bottom: var(--space-lg); }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul { padding-left: var(--space-2xl); margin: 0.5rem 0 1rem; }
.faq-answer li { margin-bottom: 0.4rem; }
.faq-answer strong { color: var(--color-slate-700); }


/* ─────────────────────────────────────────────
   9. METRIC CARD 指標卡片（inbody 等）
   ───────────────────────────────────────────── */

.metric-card {
  background: var(--color-surface);
  border-radius: 1.25rem;
  border: var(--border-light);
  padding: 1.75rem;
  box-shadow: var(--shadow-float);
  border-left: 4px solid var(--color-brand);
}

.metric-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-slate-950);
  margin-bottom: 0.25rem;
}

.metric-eng {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-brand);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}

.metric-range {
  background: var(--color-slate-50);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  color: var(--color-slate-600);
}

.metric-warn {
  background: var(--color-brand-light);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  font-size: var(--text-sm);
  color: var(--color-brand-dark);
  border-left: 3px solid var(--color-brand);
}


/* ─────────────────────────────────────────────
   10. COMPARISON TABLE 比較表格
   ───────────────────────────────────────────── */

.comp-table {
  width: 100%;
  border-collapse: collapse;
}

.comp-table thead {
  background: var(--color-slate-800);
  color: #fff;
}

.comp-table th {
  padding: 0.875rem 1rem;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  letter-spacing: var(--tracking-wide);
}

.comp-table td {
  padding: 0.875rem 1rem;
  font-size: var(--text-sm);
  color: var(--color-slate-600);
  border-bottom: var(--border-light);
}

.comp-table tbody tr:hover {
  background: var(--color-surface-dim);
}

.comp-table .highlight-row td {
  background: #FFFAF8;
}

.comp-table .highlight-row td:first-child {
  font-weight: 700;
  color: var(--color-brand-dark);
}


/* ─────────────────────────────────────────────
   11. PREP / STEP ITEM 準備步驟
   ───────────────────────────────────────────── */

.prep-item {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  padding: var(--space-lg) 0;
  border-bottom: var(--border-light);
}

.prep-item:last-child {
  border-bottom: none;
}

.prep-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}


/* ─────────────────────────────────────────────
   12. ROLE CARD 角色卡片（mental-health）
   ───────────────────────────────────────────── */

.role-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border: var(--border-light);
  padding: var(--space-3xl);
  box-shadow: var(--shadow-float);
  border-top: 4px solid var(--role-color, var(--color-brand));
  transition: var(--transition-slow);
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.1);
}

.role-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-section);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: var(--space-xl);
}

.role-meta {
  background: var(--color-slate-50);
  border-radius: 0.875rem;
  padding: var(--space-lg) var(--space-xl);
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-slate-600);
  line-height: 1.75;
}

.role-meta strong {
  display: block;
  color: var(--color-slate-700);
  margin-bottom: 0.4rem;
  font-size: 13px;
  letter-spacing: var(--tracking-wide);
}


/* ─────────────────────────────────────────────
   13. SAFE LANDING BOX 安全提示
   ───────────────────────────────────────────── */

.safe-landing-box {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: 1.25rem;
  padding: 1.75rem 2rem;
  margin-top: var(--space-4xl);
}

.safe-landing-box h4 {
  font-weight: 700;
  color: #0369A1;
  margin-bottom: 0.75rem;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.safe-landing-box p {
  font-size: var(--text-base);
  color: #0C4A6E;
  line-height: var(--leading-loose);
  margin: 0;
}


/* ─────────────────────────────────────────────
   14. CTA & SECTION DEFAULTS
   ───────────────────────────────────────────── */

.page-cta {
  background: var(--color-slate-950);
}

section {
  scroll-margin-top: 4rem;
}
