.herb-hub {
  --bg: #f4f8f5;
  --text: #1c2f27;
  --muted: #5a7267;
  --primary: #1f6b52;
  --primary-2: #2f8c69;
  --line: #d5e7de;
  --card: #ffffff;
  --soft: #eef8f3;
  --shadow: 0 14px 30px rgba(22, 67, 50, 0.12);

  color: var(--text);
  background: linear-gradient(180deg, #f8fcf9 0%, var(--bg) 100%);
}

.herb-hub * { box-sizing: border-box; }
.herb-container { width: min(1180px, 92vw); margin: 0 auto; }
.herb-section { padding: 56px 0; }
.herb-soft { background: rgba(255, 255, 255, 0.72); }

.herb-hero {
  padding: 56px 0 38px;
  background:
    radial-gradient(circle at top right, rgba(75, 172, 130, 0.18), transparent 34%),
    linear-gradient(135deg, #e7f6ef 0%, #d6efe3 100%);
  border-bottom: 1px solid rgba(31, 107, 82, 0.08);
}

.herb-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: stretch;
}

.herb-hero-main,
.herb-hero-card,
.herb-panel,
.herb-card,
.symptom-herb-card,
.herb-summary-card,
.herb-faq-list details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.herb-hero-main { padding: 30px; }
.herb-hero-card { padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.herb-kicker,
.herb-section-head p { margin: 0 0 10px; color: var(--primary); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.herb-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.08; color: #164734; }
.herb-lead { max-width: 760px; margin: 16px 0 0; color: #2f5f4d; line-height: 1.85; font-size: 1.03rem; }
.herb-hero-card strong { color: var(--primary); font-size: 1.15rem; }
.herb-hero-card p { margin: 12px 0; color: var(--muted); line-height: 1.75; }
.herb-hero-card span { color: #2d5e4b; font-weight: 700; }

.herb-search { display: flex; gap: 10px; max-width: 680px; margin-top: 22px; }
.herb-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #bcdccd;
  border-radius: 14px;
  padding: 13px 16px;
  color: var(--text);
  background: #fbfffd;
  outline: none;
}
.herb-search input:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(47, 140, 105, 0.12); }
.herb-search button,
.herb-mode-switch button {
  border: 0;
  border-radius: 14px;
  padding: 12px 20px;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(31, 107, 82, 0.18);
}

.quick-intents,
.herb-tags,
.herb-links-cloud,
.herb-links,
.herb-card-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-intents { margin-top: 16px; }
.quick-intents a,
.herb-tags a,
.herb-links-cloud a,
.herb-links a,
.herb-card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  text-decoration: none;
  color: #225544;
  background: #f2fbf6;
  border: 1px solid #d4eadf;
  font-weight: 700;
  line-height: 1.45;
}

.herb-section-head { margin-bottom: 24px; }
.herb-section-head h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.18; color: #173f31; }
.herb-head-row { display: flex; justify-content: space-between; gap: 18px; align-items: end; }

.herb-category-grid,
.herb-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.herb-panel { padding: 22px; }
.herb-panel-wide { grid-column: 1 / -1; }
.herb-panel h3,
.symptom-herb-card h3,
.herb-card h3 { margin: 0 0 14px; color: var(--text); }

.symptom-herb-map { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.symptom-herb-card { padding: 18px; }
.symptom-title { display: inline-flex; margin-bottom: 14px; color: var(--primary); font-size: 1.15rem; font-weight: 900; text-decoration: none; }
.herb-links { align-items: flex-start; }

.herb-mode-switch { display: inline-flex; gap: 8px; padding: 6px; border-radius: 16px; background: #e8f5ef; border: 1px solid #cfe9dc; }
.herb-mode-switch button { padding: 9px 14px; box-shadow: none; background: transparent; color: var(--primary); }
.herb-mode-switch button.active { color: #fff; background: linear-gradient(120deg, var(--primary), var(--primary-2)); }

.herb-card-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.herb-card { overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.herb-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(22, 67, 50, 0.16); }
.herb-card a { display: flex; flex-direction: column; height: 100%; padding: 20px; color: inherit; text-decoration: none; }
.herb-card h3 { color: var(--primary); }
.herb-card p { margin: 0 0 16px; color: var(--muted); line-height: 1.72; flex: 1; }
.herb-card-tags span { padding: 6px 10px; font-size: 0.86rem; background: var(--soft); }

.herb-alpha-panel { display: grid; gap: 18px; }
.herb-alpha-index { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; background: #ffffff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.herb-alpha-index button { display: inline-flex; align-items: center; gap: 5px; min-width: 42px; justify-content: center; border: 1px solid #cfe8dd; border-radius: 999px; padding: 8px 10px; color: #1b5f49; background: #f7fcfa; font-weight: 900; cursor: pointer; }
.herb-alpha-index button span { color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.herb-alpha-index button:hover:not(:disabled),
.herb-alpha-index button.active { color: #ffffff; border-color: transparent; background: linear-gradient(120deg, var(--primary), var(--primary-2)); }
.herb-alpha-index button.active span { color: rgba(255, 255, 255, 0.86); }
.herb-alpha-index button:disabled { cursor: not-allowed; color: #9bb4a9; background: #f0f5f2; opacity: 0.65; }
.herb-alpha-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.herb-alpha-result-head strong { color: #173f31; font-size: 1.2rem; }
.herb-alpha-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.herb-alpha-card { background: #ffffff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 24px rgba(22, 67, 50, 0.08); overflow: hidden; }
.herb-alpha-card[hidden],
.herb-alpha-panel[hidden],
.herb-featured-panel[hidden] { display: none !important; }
.herb-alpha-card a { display: block; height: 100%; padding: 18px; color: inherit; text-decoration: none; }
.herb-alpha-card h3 { margin: 0; color: var(--primary); font-size: 1.08rem; }
.herb-alpha-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 0.92rem; }
.herb-alpha-card p { display: -webkit-box; overflow: hidden; margin: 12px 0 0; color: var(--muted); line-height: 1.65; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.herb-alpha-card:hover { border-color: #add8c5; box-shadow: 0 16px 32px rgba(22, 67, 50, 0.12); }

.herb-topic-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.herb-topic-tile { padding: 0; overflow: hidden; }
.herb-topic-tile a,
.herb-topic-related-card a { display: flex; flex-direction: column; height: 100%; padding: 22px; color: inherit; text-decoration: none; }
.herb-topic-tile h3,
.herb-topic-related-card h3 { margin: 0 0 12px; color: var(--primary); }
.herb-topic-tile p,
.herb-topic-related-card p { margin: 0 0 16px; color: var(--muted); line-height: 1.72; flex: 1; }
.herb-topic-tile span,
.herb-topic-related-card span,
.herb-topic-link,
.herb-topic-button { color: var(--primary); font-weight: 900; text-decoration: none; }
.herb-topic-tile:hover,
.herb-topic-related-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(22, 67, 50, 0.16); }
.herb-topic-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: stretch; }
.herb-topic-actions { margin-top: 20px; }
.herb-topic-button { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 10px 16px; color: #fff; background: linear-gradient(120deg, var(--primary), var(--primary-2)); }
.herb-topic-stat-card strong { font-size: 1.45rem; }
.herb-topic-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.herb-topic-knowledge-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.herb-topic-guide h2 { margin: 0 0 12px; color: #173f31; font-size: 1.35rem; }
.herb-topic-guide p { margin: 0; color: var(--muted); line-height: 1.85; }
.herb-topic-guide-warn { border-color: #ead7b8; background: #fffaf0; }
.herb-topic-related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.herb-summary-section { background: linear-gradient(135deg, #e8f7ef, #d9f0e3); }
.herb-summary-card { padding: 26px; }
.herb-summary-text { display: grid; gap: 10px; max-width: 900px; }
.herb-summary-text p { margin: 0; color: #2f5f4d; line-height: 1.85; }

.herb-faq-list { display: grid; gap: 12px; background: transparent; border: 0; box-shadow: none; }
.herb-faq-list details { padding: 17px 20px; }
.herb-faq-list summary { cursor: pointer; color: var(--text); font-weight: 800; }
.herb-faq-list p { margin: 12px 0 0; color: var(--muted); line-height: 1.75; }

@media (max-width: 1100px) {
  .herb-hero-grid { grid-template-columns: 1fr; }
  .symptom-herb-map,
  .herb-card-grid,
  .herb-alpha-grid,
  .herb-topic-grid,
  .herb-topic-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .herb-topic-hero-grid,
  .herb-topic-knowledge-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .herb-section { padding: 42px 0; }
  .herb-hero { padding: 42px 0 30px; }
  .herb-hero-main,
  .herb-hero-card,
  .herb-panel,
  .herb-summary-card { padding: 20px; }
  .herb-search { flex-direction: column; }
  .herb-search button { width: 100%; }
  .herb-category-grid,
  .herb-link-grid,
  .symptom-herb-map,
  .herb-card-grid,
  .herb-alpha-grid,
  .herb-topic-grid,
  .herb-topic-card-grid,
  .herb-topic-related-grid { grid-template-columns: 1fr; }
  .herb-head-row { align-items: flex-start; flex-direction: column; }
  .herb-mode-switch { width: 100%; overflow-x: auto; }
  .herb-alpha-index { flex-wrap: nowrap; overflow-x: auto; }
  .herb-alpha-index button { flex: 0 0 auto; }
}
