/**
 * 七十二候页专属样式
 * 用于：/wuhou/（默认当年）、/wuhou/YYYY（按年伪静态）与 /wuhou/{拼音}（72 个候应介绍页）
 *
 * 表单 / 面板 / 表格 / 提示一律用公用 .cx-*（style/chaxun.css）与 .tbl-scroll（style/site.css），
 * 本文件只写本页特有的：候名列、要素表、当前候与本页候的两种行底色、相邻导航与节气内链。
 */

/* 候名：表内与详情页共用，比正文大一号，用标题字体 */
.wd-name {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
}

.wd-name:hover { color: var(--cinnabar); }

/* 候应释义：跟在候名之下，淡墨小字，手机隐藏（否则 tbl-scroll 会把整表撑得很宽） */
.wd-gloss {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.wd-j {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  color: var(--gilt);
  white-space: nowrap;
}

/* 日期与天数列：等宽数字，避免每年切换时宽度跳动 */
#wd_table td.num,
#wd_years td.num,
#wd_three td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 节气列与候名列留点呼吸，别把「天气上升地气下降」这种长名挤成两行 */
#wd_table td:first-child { white-space: nowrap; }
#wd_table .wd-name { white-space: nowrap; }

/* 本页所讲的那一候（详情页「同节气三候」表）：青绿行底，与「今天」的朱红行底区分开 */
.cx-table tr.wd-here td {
  background: rgba(44, 110, 82, 0.09);
  font-weight: 600;
}

/* 简介要素表（所属节气 / 候序 / 物候释义 / 农事提示 …） */
.wd-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px 18px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 14px;
}

.wd-facts > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
}

.wd-facts dt {
  flex: 0 0 5.5em;
  color: var(--gilt);
  letter-spacing: 0.08em;
}

/* dd 是 flex 项，不给 min-width:0 时长文案会把整列顶宽（flex 项默认不缩到内容以下） */
.wd-facts dd { margin: 0; min-width: 0; color: var(--ink); }
.wd-facts dd a { color: var(--jade); }

/* 相邻候应 / 相邻年份导航 */
/* 二十四节气内链：大全页与候应页都要有入链，放在表尾 */
.wd-terms {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--field);
  font-size: 13px;
  line-height: 1.9;
}

.wd-terms_label { color: var(--gilt); letter-spacing: 0.14em; }
.wd-terms a { color: var(--ink-soft); text-decoration: none; }
.wd-terms a:hover { color: var(--cinnabar); }

@media (min-width: 769px) {
  .wd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 释义、农事两行较长，宽屏也各占一整列 */
  .wd-facts > .wd-wide { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .wd-gloss { display: none; }

  /* 冻结首列的底色由变量给，本页自己的行底色要各补一份，否则滑动时首列会露出旧底色 */
  .tbl-scroll--fix tbody tr.wd-here td:first-child {
    background: color-mix(in srgb, var(--field) 91%, #2c6e52);
  }
}
