/* 本草农业 /herbal/ · 保留原站设计语言（森林绿 / 纸白 / 暖金），补公共导航与卡片 */
:root {
  --hb-bg: #f5f3ea;
  --hb-forest: #16392c;
  --hb-leaf: #4c7a52;
  --hb-teal: #0c8c7e;
  --hb-ink: #18231c;
  --hb-gold: #9a7628;
  --hb-hair: rgba(22, 57, 44, 0.12);
  --hb-glass: rgba(255, 255, 255, 0.62);
}

* { box-sizing: border-box; }

body.hb {
  margin: 0;
  background: var(--hb-bg);
  color: var(--hb-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.hb a { color: var(--hb-forest); text-decoration: none; }
.hb a:hover { text-decoration: underline; }

.hb-shell { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.hb-skip { position: absolute; left: -9999px; }
.hb-skip:focus { left: 16px; top: 64px; z-index: 200; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* 顶部 */
.hb-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(245, 243, 234, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hb-hair);
}
.hb-header__inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.hb-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--hb-forest); }
.hb-brand:hover { text-decoration: none; }
.hb-brand__mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--hb-hair);
  font-size: 15px; font-weight: 600; color: var(--hb-forest);
}
.hb-brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.hb-brand__text strong { font-size: 15px; letter-spacing: 0.04em; }
.hb-brand__text em { font-style: normal; font-size: 9px; letter-spacing: 0.16em; color: var(--hb-leaf); }

.hb-nav { display: flex; gap: 18px; margin-left: 8px; }
.hb-nav a { font-size: 14px; color: #33453a; }
.hb-nav a[aria-current="page"] { color: var(--hb-forest); font-weight: 600; }

.hb-headsearch { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hb-headsearch input {
  width: 170px; padding: 7px 12px; font-size: 13px;
  border: 1px solid var(--hb-hair); border-radius: 999px; background: #fff; color: var(--hb-ink);
}
.hb-headsearch button {
  padding: 7px 14px; font-size: 13px; border-radius: 999px; border: 0;
  background: var(--hb-forest); color: #fff; cursor: pointer;
}

/* 首屏 */
.hb-hero { padding: 72px 0 56px; background: linear-gradient(180deg, #f0eee2 0%, var(--hb-bg) 100%); border-bottom: 1px solid var(--hb-hair); }
.hb-kicker { margin: 0 0 14px; font-size: 11.5px; letter-spacing: 0.18em; color: var(--hb-leaf); }
.hb-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--hb-forest);
  font-weight: 600;
}
.hb-lede { margin: 0 0 26px; max-width: 640px; font-size: 16px; color: #35463c; }
.hb-lede--sm { font-size: 14.5px; color: #465a4e; }

.hb-hero__search { display: flex; gap: 8px; max-width: 520px; }
.hb-hero__search input {
  flex: 1; min-width: 0; padding: 12px 16px; font-size: 14px;
  border: 1px solid var(--hb-hair); border-radius: 999px; background: #fff; color: var(--hb-ink);
}
.hb-hero__search button {
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--hb-forest); color: #fff; font-size: 14px;
}
.hb-hero__search--flat { margin-bottom: 22px; }

.hb-stats { display: flex; flex-wrap: wrap; gap: 34px; margin: 42px 0 0; padding: 0; }
.hb-stats div { display: flex; flex-direction: column-reverse; gap: 2px; }
.hb-stats dt { font-size: 26px; font-weight: 600; color: var(--hb-forest); }
.hb-stats dd { margin: 0; font-size: 12px; color: #5b6f62; letter-spacing: 0.04em; }

/* 区块 */
.hb-section { padding: 46px 0 8px; }
.hb-section__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.hb-section__head h2 { margin: 0; font-size: 20px; color: var(--hb-forest); letter-spacing: 0.01em; }
.hb-more { margin-left: auto; font-size: 13.5px; }
.hb-muted { color: #6c7f72; font-size: 13px; }
.hb-h1 { margin: 8px 0 12px; font-size: clamp(26px, 3.4vw, 36px); color: var(--hb-forest); font-weight: 600; }

/* 分类 */
.hb-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hb-cat {
  display: flex; flex-direction: column; gap: 3px;
  padding: 16px 18px; border-radius: 14px;
  background: var(--hb-glass); border: 1px solid var(--hb-hair);
  color: var(--hb-ink);
}
.hb-cat:hover { text-decoration: none; border-color: rgba(22, 57, 44, 0.28); background: #fff; }
.hb-cat__name { font-size: 15.5px; font-weight: 600; color: var(--hb-forest); }
.hb-cat__en { font-size: 10.5px; letter-spacing: 0.12em; color: var(--hb-leaf); }
.hb-cat__sum { font-size: 12.5px; line-height: 1.6; color: #5d7164; }
.hb-cat__count { margin-top: 6px; font-size: 12px; color: var(--hb-gold); }

/* 卡片 */
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hb-grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hb-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 20px; border-radius: 16px;
  background: var(--hb-glass); border: 1px solid var(--hb-hair);
  color: var(--hb-ink);
}
.hb-card:hover { text-decoration: none; background: #fff; border-color: rgba(22, 57, 44, 0.25); }
.hb-card__kicker { margin: 0; font-size: 11px; letter-spacing: 0.1em; color: var(--hb-leaf); }
.hb-card h3 { margin: 2px 0 2px; font-size: 19px; color: var(--hb-forest); }
.hb-card h3 small { font-size: 12px; font-weight: 400; color: #7b8e81; margin-left: 4px; }
.hb-card__latin { margin: 0; font-size: 12.5px; font-style: italic; color: #55685b; }
.hb-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; font-size: 12.5px; color: #46594c; }
.hb-card__meta span { padding: 1px 8px; border-radius: 999px; background: rgba(22, 57, 44, 0.06); }
.hb-card__foot { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }

.hb-entry {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 20px; border-radius: 16px; background: #fff; border: 1px solid var(--hb-hair);
  color: var(--hb-ink);
}
.hb-entry:hover { text-decoration: none; border-color: rgba(22, 57, 44, 0.28); }
.hb-entry strong { color: var(--hb-forest); font-size: 15.5px; }
.hb-entry span { font-size: 12.5px; color: #5d7164; line-height: 1.6; }

.hb-updates { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hb-hair); }
.hb-updates li { display: flex; align-items: baseline; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--hb-hair); font-size: 14px; }
.hb-updates li .hb-muted { font-style: italic; }

/* 徽标 */
.hb-badge { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 11px; line-height: 1.7; border: 1px solid currentColor; white-space: nowrap; }
.hb-badge--unsure { color: #96690f; }
.hb-badge--ok { color: #2f7a5b; }
.hb-updated { font-size: 11.5px; color: #71857a; }

/* 面包屑 */
.hb-crumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 18px; font-size: 12.5px; color: #6c7f72; }
.hb-crumb a { color: #4d6357; }
.hb-crumb span[aria-current] { color: #33453a; }

/* 筛选 */
.hb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.hb-filters input, .hb-filters select {
  padding: 9px 13px; font-size: 13.5px; border: 1px solid var(--hb-hair);
  border-radius: 10px; background: #fff; color: var(--hb-ink); min-width: 0;
}
.hb-filters input { flex: 1 1 220px; }
.hb-filters button { padding: 9px 18px; border-radius: 10px; border: 0; background: var(--hb-forest); color: #fff; font-size: 13.5px; cursor: pointer; }

/* 详情 */
.hb-detail { padding-top: 26px; padding-bottom: 20px; }
.hb-detail__head h1 { margin: 0 0 6px; font-size: clamp(30px, 4vw, 42px); color: var(--hb-forest); font-weight: 600; }
.hb-detail__head h1 small { font-size: 16px; font-weight: 400; color: #71857a; margin-left: 8px; }
.hb-detail__latin { margin: 0 0 14px; font-style: italic; color: #55685b; font-size: 14.5px; }
.hb-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 12.5px; }
.hb-chips > span:not(.hb-badge) { padding: 2px 10px; border-radius: 999px; background: rgba(22, 57, 44, 0.07); color: #3f5247; }

.hb-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 26px 0 10px; }
.hb-figs figure { margin: 0; background: #fff; border: 1px solid var(--hb-hair); border-radius: 14px; padding: 10px; text-align: center; }
.hb-figs img { width: 100%; height: auto; display: block; }
.hb-figs figcaption { margin-top: 6px; font-size: 11.5px; color: #6c7f72; }

.hb-fields { margin-top: 18px; }
.hb-fieldgroup { margin-top: 30px; }
.hb-fieldgroup h2 { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--hb-hair); font-size: 17px; color: var(--hb-forest); }
.hb-fieldgroup dl { margin: 0; }
.hb-field { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--hb-hair); }
.hb-field dt { font-size: 13.5px; color: #3d5044; font-weight: 600; }
.hb-field dd { margin: 0; font-size: 14px; color: #26362c; }
.hb-field__src { margin-top: 6px; font-size: 11.5px; color: #71857a; }
.hb-src { color: #4c6b5a; }
.hb-prov { font-size: 11.5px; }

.hb-disclaimer { margin: 40px 0 10px; padding: 18px 22px; border-radius: 14px; background: rgba(154, 118, 40, 0.08); border: 1px solid rgba(154, 118, 40, 0.24); }
.hb-disclaimer strong { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: 0.06em; color: #7a5a13; }
.hb-disclaimer p { margin: 0; font-size: 13px; line-height: 1.75; color: #5c4c25; }

/* 表格 */
.hb-tablewrap { overflow-x: auto; border: 1px solid var(--hb-hair); border-radius: 14px; background: #fff; }
.hb-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 13px; }
.hb-table th { text-align: left; padding: 11px 12px; background: #f0eee2; color: var(--hb-forest); font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--hb-hair); }
.hb-table td { padding: 10px 12px; border-bottom: 1px solid rgba(22, 57, 44, 0.07); vertical-align: top; }
.hb-table tr:last-child td { border-bottom: 0; }
.hb-table tbody tr:hover { background: #fbfaf4; }

/* 空态 / 分页 / 长文 */
.hb-empty { margin: 26px 0; padding: 26px; border-radius: 14px; background: #fff; border: 1px dashed var(--hb-hair); }
.hb-empty h2 { margin: 0 0 6px; font-size: 17px; color: var(--hb-forest); }
.hb-empty p { margin: 0; font-size: 13.5px; color: #5d7164; }
.hb-pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0; }
.hb-pager a, .hb-pager span { display: inline-block; min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--hb-hair); background: #fff; font-size: 13px; }
.hb-pager span[aria-current] { background: var(--hb-forest); color: #fff; border-color: var(--hb-forest); }
.hb-prose { max-width: 860px; }
.hb-prose h2 { margin: 30px 0 10px; font-size: 18px; color: var(--hb-forest); }
.hb-prose p, .hb-prose li { font-size: 14.5px; color: #33453a; }
.hb-prose code { padding: 1px 6px; border-radius: 5px; background: rgba(22, 57, 44, 0.07); font-size: 12.5px; }

/* 页脚 */
.hb-footer { margin-top: 60px; padding: 10px 0 40px; background: var(--hb-forest); color: #d9e4dc; }
.hb-footer a { color: #e6efe8; }
.hb-footer .agfoot { border-color: rgba(255, 255, 255, 0.16); }
.hb-footer__bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 12.5px; }
.hb-footer__bottom p { margin: 0; }
.hb-footer__note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.7; color: rgba(217, 228, 220, 0.66); }

@media (max-width: 860px) {
  .hb-nav { display: none; }
  .hb-headsearch input { width: 120px; }
  .hb-field { grid-template-columns: 1fr; gap: 4px; }
  .hb-hero { padding: 48px 0 40px; }
  .hb-stats { gap: 22px; }
}

@media (max-width: 560px) {
  .hb-shell { padding: 0 16px; }
  .hb-headsearch { display: none; }
  .hb-hero__search { flex-direction: column; }
  .hb-hero__search button { width: 100%; }
}
