/* The Herbarium — plant records inside Herb & Remedy.
   Denser than the rest of the site on purpose: these are reference entries, not
   essays, and they should read like a specimen label rather than an article. */

/* ------------------------------------------------------------------ index --- */

.hb-index {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 36px 24px 0;
}

.hb-filters {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 16px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.hb-filters .ins-field { display: grid; gap: 6px; }

.hb-filters label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hb-filters input,
.hb-filters select {
  background: var(--night);
  border: 1px solid var(--border);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  padding: 9px 11px;
  width: 100%;
}

.hb-filters input:focus,
.hb-filters select:focus { outline: none; border-color: var(--accent); }

.hb-count {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 0;
}

.hb-table { width: 100%; border-collapse: collapse; margin-top: 8px; }

.hb-table th, .hb-table td {
  text-align: left;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: baseline;
}

.hb-table thead th {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

.hb-row[hidden] { display: none; }

.hb-c-name a { text-decoration: none; display: block; }
.hb-c-name i { font-size: 16.5px; font-style: italic; }
.hb-c-name a:hover i { color: var(--accent); }

.hb-c-common {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 1px;
}

.hb-c-family, .hb-c-part {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.hb-empty { color: var(--muted); font-size: 15px; padding-top: 18px; }

/* ------------------------------------------------------------------ pills --- */

.hb-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }

.hb-pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--border);
  white-space: nowrap;
  cursor: help;
}

/* Evidence: neutral. These are statements about the literature, not verdicts. */
.hb-ev { color: var(--muted); }
.hb-ev-trial-support { color: #57A88B; border-color: #2f5f4e; }
.hb-ev-no-support { color: var(--muted); }

/* Hazard: the one place on this site where colour is doing a safety job. */
.hb-hz-serious { color: #E06A4C; border-color: #7a3325; background: rgba(224, 106, 76, .08); }
.hb-hz-caution { color: var(--accent); border-color: #6b5518; }
.hb-hz-low { color: var(--muted); }

.hb-drug { color: var(--accent); border-color: #6b5518; }
.hb-cons { color: #E06A4C; border-color: #7a3325; }

/* ------------------------------------------------------------------ entry --- */

.hb-entry .article-heading { font-style: normal; }
.hb-entry .article-heading i { font-style: italic; }
.hb-entry .article-type { text-transform: none; letter-spacing: .04em; }

.hb-fields {
  display: grid;
  gap: 0;
  margin: 0 0 30px;
  border-top: 1px solid var(--border);
}

.hb-field {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.hb-field dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hb-field dd { margin: 0; font-size: 15.5px; line-height: 1.6; }

.hb-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--paper);
  border: 1px solid var(--border);
  padding: 2px 8px;
  margin: 0 6px 4px 0;
}

.hb-block { margin-bottom: 30px; }

.hb-block h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.hb-block p { font-size: 15.5px; line-height: 1.65; margin: 0 0 10px; max-width: var(--measure); }

.hb-note {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* Safety is visually distinct because it is the field a reader most needs to
   have noticed, and the one most easily skimmed past. */
.hb-safety {
  border-left: 3px solid #E06A4C;
  padding: 16px 0 4px 18px;
  background: rgba(224, 106, 76, .04);
}

.hb-safety h2 { color: #E06A4C; }
.hb-interactions b, .hb-reg b { color: var(--paper); font-weight: 500; }
.hb-interactions, .hb-reg { font-size: 14.5px; color: var(--muted); }

.hb-consts { display: grid; gap: 10px; }

.hb-const {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.hb-const-class { font-size: 15px; }
.hb-const-markers { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.hb-trads { display: grid; gap: 12px; margin-bottom: 14px; }

.hb-trad {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.hb-trad-name {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}

.hb-trad-body { font-size: 15px; line-height: 1.6; }

.hb-hook .prose { max-width: var(--measure); }

.hb-checked {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 30px;
}

/* ------------------------------------------------------------------ small --- */

@media (max-width: 900px) {
  .hb-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .hb-index { padding-left: 16px; padding-right: 16px; }
  .hb-filters { grid-template-columns: 1fr; }

  /* The table is the index. Let it scroll rather than crush five columns. */
  .hb-table { display: block; overflow-x: auto; white-space: nowrap; }
  .hb-table th, .hb-table td { white-space: normal; min-width: 104px; }
  .hb-c-name { min-width: 180px; }

  .hb-field, .hb-const, .hb-trad { grid-template-columns: 1fr; gap: 4px; }
  .hb-safety { padding-left: 14px; }
}
