/* jiuyun.css — 「三元九運」叢集專用樣式（暖象牙精品風，沿用支柱頁色系）。
   本檔在 style.css / article.css 之後載入：在 :root 覆蓋暗金 token，整頁 chrome
   （header / footer / .article / .cta-card / .rizhu-card / .faq）自動翻亮。
   共用件沿用 article.css 結構，本檔只覆蓋配色/字體並補本叢集專屬元件。
   配色紀律：金只當強調點，區塊標題與關鍵數字一律走深色錨；五行五色分辨九運，不做單溫層全金。 */

:root {
  --bg: #f7f3ec; --bg-card: #ffffff; --bg-input: #fffdf9; --border: #e4ddce;
  --text: #201d18; --text-dim: #6f685c; --gold: #a6824c; --gold-soft: #c0a070;
  --radius: 14px;
  /* 五行語意色（與 career.css 同一套調性，避免全站兩種綠兩種紅） */
  --wx-mu: #4f8c5f;    /* 木：松綠 */
  --wx-huo: #bd5f42;   /* 火：窯磚 */
  --wx-tu: #a07a3f;    /* 土：赭金 */
  --wx-jin: #7d8494;   /* 金：鋼灰 */
  --wx-shui: #46618f;  /* 水：靛藍 */
  --ink: #2f2a22;      /* 深色錨：區塊標題與關鍵數字用它，不用金 */
  --lux-serif: 'Cormorant Garamond', 'Noto Serif TC', Georgia, serif;
  --lux-sans: 'Jost', 'Noto Sans TC', 'Helvetica Neue', Arial, sans-serif;
}

body { font-family: var(--lux-sans); }
.article h1, .article h2, .jy-note h2 { font-family: var(--lux-serif); font-weight: 600; }
.article h1 { font-size: 2.1rem; letter-spacing: 0.01em; line-height: 1.34; }
.article h2 { letter-spacing: 0.02em; }
.article .lead { font-size: 1.06rem; }
.article .lead b { color: var(--gold); font-weight: 500; }

.jy-sub { color: var(--text-dim); font-size: 0.97rem; margin: 0 0 16px; }

/* ── 運期檔案：六格規格卡（九星／卦／五行／方位／人象／元） ── */
.jy-file {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-top: 3px solid var(--yc, var(--gold)); border-radius: 12px; overflow: hidden;
  margin: 10px 0 18px;
}
.jy-file div { background: var(--bg-card); padding: 12px 14px; }
.jy-file dt { font-size: 0.7rem; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 3px; }
.jy-file dd { margin: 0; font-family: var(--lux-serif); font-size: 1.22rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.jy-file dd small { display: block; font-family: var(--lux-sans); font-size: 0.78rem; font-weight: 400; color: var(--text-dim); letter-spacing: 0.02em; margin-top: 2px; }
.jy-file .jy-f-hi dd { color: var(--yc, var(--gold)); }

/* ── 180 年總表 ── */
.jy-tablewrap { overflow-x: auto; margin: 6px 0 14px; border-radius: 12px; }
.jy-table { width: 100%; border-collapse: collapse; background: var(--bg-card); font-size: 0.9rem; }
.jy-table th, .jy-table td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.jy-table thead th { background: #f1eadd; color: var(--text-dim); font-weight: 500; font-size: 0.82rem; white-space: nowrap; }
.jy-table td { color: var(--text); line-height: 1.65; }
.jy-table tbody th {
  font-family: var(--lux-serif); font-size: 1.02rem; color: #fffdf9; background: var(--rc, var(--gold));
  text-align: center; white-space: nowrap; font-weight: 600;
}
.jy-table .t-dim { color: var(--text-dim); font-size: 0.84rem; }
.jy-table .t-yr { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; white-space: nowrap; }
.jy-table tr.is-now td, .jy-table tr.is-now th { background: #fbf4e6; }
.jy-table tr.is-now .t-yr { color: var(--wx-huo); }
.jy-table a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--gold-soft); }
.jy-table a:hover { color: var(--gold); }

/* ── 九運卡片格（hub 導子頁） ── */
.jy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 14px; }
.jy-card {
  display: flex; flex-direction: column; background: var(--bg-card);
  border: 1px solid var(--border); border-top: 3px solid var(--yc); border-radius: 12px;
  padding: 14px 15px 13px; text-decoration: none; transition: border-color .15s, transform .15s;
}
.jy-card:hover { border-color: var(--yc); transform: translateY(-2px); }
.jy-card .jy-c-yr { font-size: 0.74rem; letter-spacing: 0.06em; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.jy-card h3 { margin: 2px 0 5px; font-family: var(--lux-serif); font-size: 1.3rem; color: var(--yc); font-weight: 600; }
.jy-card .jy-c-key { font-size: 0.88rem; color: var(--ink); line-height: 1.6; margin: 0 0 7px; }
.jy-card .jy-c-ev { font-size: 0.8rem; color: var(--text-dim); line-height: 1.6; margin: 0 0 9px; }
.jy-card .jy-c-more { margin-top: auto; font-size: 0.85rem; color: var(--yc); font-weight: 500; }
.jy-card.is-now { box-shadow: 0 0 0 1px var(--yc) inset; }
.jy-card .jy-c-now {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.1em; color: #fffdf9;
  background: var(--yc); padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px;
}

/* ── 歷史事件時間軸 ── */
.jy-timeline { margin: 8px 0 16px; padding-left: 0; list-style: none; border-left: 2px solid var(--border); }
.jy-ev { position: relative; padding: 0 0 15px 20px; }
.jy-ev::before {
  content: ''; position: absolute; left: -5px; top: 9px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--yc, var(--gold)); box-shadow: 0 0 0 3px var(--bg);
}
.jy-ev .jy-ev-y { font-family: var(--lux-serif); font-size: 1.12rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 8px; }
.jy-ev .jy-ev-t { font-size: 0.99rem; color: var(--text); font-weight: 500; }
.jy-ev p { margin: 3px 0 0; font-size: 0.87rem; color: var(--text-dim); line-height: 1.75; }
.jy-ev p b { color: var(--yc, var(--gold)); font-weight: 500; }

/* ── 上一輪回聲框 ── */
.jy-echo {
  background: linear-gradient(160deg, #fbf6ee, #fffdf9);
  border: 1px solid var(--border); border-left: 4px solid var(--yc, var(--gold));
  border-radius: 12px; padding: 17px 19px; margin: 10px 0 14px;
}
.jy-echo h3 { margin: 0 0 8px; font-family: var(--lux-serif); font-size: 1.24rem; color: var(--ink); font-weight: 600; }
.jy-echo h3 span { font-size: 0.82rem; font-family: var(--lux-sans); color: var(--text-dim); letter-spacing: 0.04em; margin-left: 8px; font-weight: 400; }
.jy-echo ul { margin: 0; padding-left: 1.05em; }
.jy-echo li { color: var(--text); font-size: 0.92rem; line-height: 1.8; margin-bottom: 4px; }
.jy-echo li::marker { color: var(--yc, var(--gold)); }
.jy-echo li b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.jy-echo > p { margin: 9px 0 0; font-size: 0.89rem; color: var(--text-dim); line-height: 1.8; }

/* ── 兩欄對照（當運得勢 / 退場） ── */
.jy-two { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 8px 0 14px; }
.jy-col {
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: 3px solid var(--cc, var(--gold)); border-radius: 12px; padding: 15px 17px 13px;
}
.jy-col .jy-c-tag { font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.jy-col h3 { margin: 3px 0 8px; font-family: var(--lux-serif); font-size: 1.32rem; color: var(--cc, var(--gold)); font-weight: 600; }
.jy-col ul { margin: 0; padding-left: 1.05em; }
.jy-col li { color: var(--text); font-size: 0.9rem; line-height: 1.72; margin-bottom: 5px; }
.jy-col li::marker { color: var(--cc, var(--gold)); }

/* ── 三格重點（換運三件事、讀法三提醒…） ── */
.jy-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 14px; }
.jy-pt {
  background: var(--bg-card); border: 1px solid var(--border); border-top: 3px solid var(--sc, var(--gold));
  border-radius: 12px; padding: 14px 15px 12px;
}
.jy-pt .jy-pt-n { font-family: var(--lux-serif); font-size: 1.14rem; color: var(--ink); font-weight: 600; display: block; }
.jy-pt .jy-pt-k { display: block; font-size: 0.74rem; color: var(--sc, var(--gold)); margin: 1px 0 7px; letter-spacing: 0.05em; }
.jy-pt p { margin: 0; color: var(--text-dim); font-size: 0.85rem; line-height: 1.78; }
.jy-pt b { color: var(--text); font-weight: 500; }

/* ── 誠實話 ── */
.jy-note {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-input));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 21px 23px; margin: 12px 0 8px;
}
.jy-note h2 { margin-top: 0; }
.jy-note p { color: var(--text-dim); }
.jy-note p + p { margin-top: 9px; }
.jy-note b { color: var(--gold); }

/* ── 上下運導覽 ── */
.jy-prevnext { display: flex; gap: 12px; margin: 18px 0 6px; }
.jy-prevnext a {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; text-decoration: none; color: var(--text);
}
.jy-prevnext a:hover { border-color: var(--gold-soft); }
.jy-prevnext .jy-pn-l { display: block; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-dim); }
.jy-prevnext .jy-pn-t { display: block; font-family: var(--lux-serif); font-size: 1.08rem; color: var(--ink); font-weight: 600; margin-top: 2px; }
.jy-prevnext .jy-pn-next { text-align: right; }

/* ── 雙 CTA 副鈕 ── */
.cta-card .cta-btns .btn-affinity { border: 1px solid var(--wx-huo); color: var(--wx-huo); }

@media (max-width: 720px) {
  .jy-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .jy-three { grid-template-columns: 1fr; }
  .jy-two { grid-template-columns: 1fr; }
  .jy-file { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 430px) {
  .article h1 { font-size: 1.76rem; }
  .jy-grid { grid-template-columns: 1fr; }
  .jy-prevnext { flex-direction: column; }
  .jy-prevnext .jy-pn-next { text-align: left; }
}
