/* ============================================================
   HostGuru Help Center KB — kb.css
   Loaded only on KB pages via inc/kb.php (handle: hostguru-kb)
   ============================================================ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ═══════════════════════════════════════════════════════════════
   1. KB HUB HERO
   ═══════════════════════════════════════════════════════════════ */
.hg-kb-hero {
  background: linear-gradient(135deg, #0a0f1e 0%, #111827 55%, #1a1f35 100%);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hg-kb-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(245, 114, 0, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hg-kb-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 114, 0, 0.4), transparent);
}

.hg-kb-hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.18;
}

.hg-kb-hero-glow-l {
  background: radial-gradient(circle, #f57200, transparent);
  top: -180px;
  left: -120px;
}

.hg-kb-hero-glow-r {
  background: radial-gradient(circle, #3b82f6, transparent);
  top: -120px;
  right: -120px;
}

.hg-kb-hero-inner {
  position: relative;
  z-index: 2;
}

.hg-kb-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 114, 0, 0.12);
  border: 1px solid rgba(245, 114, 0, 0.3);
  color: #f57200;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--hg-radius-full);
  padding: 6px 16px;
  margin-bottom: 20px;
}

.hg-kb-hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  color: var(--hg-white);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hg-kb-hero h1 span {
  background: linear-gradient(90deg, #f57200, #ff9c40);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hg-kb-hero-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

/* ═══════════════════════════════════════════════════════════════
   2. KB SEARCH BAR
   ═══════════════════════════════════════════════════════════════ */
.hg-kb-search-wrap {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.hg-kb-search-form {
  display: flex;
  align-items: center;
  background: var(--hg-white);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 56px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(245, 114, 0, 0.0);
  transition: box-shadow 0.2s, border-color 0.2s;
  overflow: visible;
  position: relative;
}

.hg-kb-search-form:focus-within {
  border-color: var(--hg-orange);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(245, 114, 0, 0.18);
}

.hg-kb-search-icon {
  flex-shrink: 0;
  padding: 0 0 0 22px;
  color: var(--hg-gray-500);
  display: flex;
  align-items: center;
}

.hg-kb-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--hg-gray-900);
  padding: 18px 16px;
  min-width: 0;
}

.hg-kb-search-input::placeholder {
  color: var(--hg-gray-500);
}

.hg-kb-search-btn {
  flex-shrink: 0;
  background: var(--hg-orange);
  color: var(--hg-white);
  border: none;
  border-radius: 48px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 26px;
  margin: 5px;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
  white-space: nowrap;
}

.hg-kb-search-btn:hover {
  background: var(--hg-orange-dark);
  transform: translateY(-1px);
}

/* Search Dropdown */
.hg-kb-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--hg-white);
  border: 1.5px solid var(--hg-gray-200);
  border-radius: var(--hg-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  z-index: 999;
  overflow: hidden;
  display: none;
}

.hg-kb-search-dropdown.is-open {
  display: block;
  animation: kbDropIn 0.18s ease;
}

@keyframes kbDropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hg-kb-drop-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  border-bottom: 1px solid var(--hg-gray-100);
}

.hg-kb-drop-item:last-child { border-bottom: none; }

.hg-kb-drop-item:hover,
.hg-kb-drop-item.is-active {
  background: var(--hg-gray-50);
}

.hg-kb-drop-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: rgba(245, 114, 0, 0.1);
  border-radius: var(--hg-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hg-orange);
}

.hg-kb-drop-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--hg-gray-900);
  line-height: 1.4;
  margin-bottom: 2px;
}

.hg-kb-drop-cat {
  font-size: 11.5px;
  color: var(--hg-gray-500);
}

.hg-kb-drop-empty {
  padding: 24px 18px;
  text-align: center;
  color: var(--hg-gray-500);
  font-size: 13.5px;
}

.hg-kb-drop-loading {
  padding: 20px 18px;
  text-align: center;
  color: var(--hg-gray-500);
  font-size: 13px;
}

.hg-kb-drop-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--hg-gray-200);
  border-top-color: var(--hg-orange);
  border-radius: 50%;
  animation: kbSpin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes kbSpin {
  to { transform: rotate(360deg); }
}

/* Popular searches chips */
.hg-kb-pop-searches {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hg-kb-pop-searches span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hg-kb-pop-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--hg-radius-full);
  padding: 5px 13px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.hg-kb-pop-chip:hover {
  background: rgba(245, 114, 0, 0.18);
  border-color: rgba(245, 114, 0, 0.4);
  color: #f57200;
}

/* ═══════════════════════════════════════════════════════════════
   3. KB STATS BAR
   ═══════════════════════════════════════════════════════════════ */
.hg-kb-stats-bar {
  background: var(--hg-white);
  border-bottom: 1px solid var(--hg-gray-200);
  padding: 20px 0;
}

.hg-kb-stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hg-kb-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hg-kb-stat-icon {
  width: 36px;
  height: 36px;
  background: rgba(245, 114, 0, 0.08);
  border-radius: var(--hg-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hg-orange);
  flex-shrink: 0;
}

.hg-kb-stat-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--hg-gray-900);
  line-height: 1;
}

.hg-kb-stat-lbl {
  font-size: 12px;
  color: var(--hg-gray-500);
  line-height: 1;
  margin-top: 2px;
}

.hg-kb-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--hg-gray-200);
}

.hg-kb-stats-trust {
  font-size: 12.5px;
  color: var(--hg-gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hg-kb-stats-trust svg { color: #16a34a; }

/* ═══════════════════════════════════════════════════════════════
   4. CATEGORY CARDS GRID
   ═══════════════════════════════════════════════════════════════ */
.hg-kb-section {
  padding: 72px 0;
}

.hg-kb-section-alt {
  background: var(--hg-gray-50);
}

.hg-kb-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.hg-kb-section-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--hg-gray-900);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hg-kb-section-title .hg-kb-icon {
  width: 38px;
  height: 38px;
  background: rgba(245, 114, 0, 0.1);
  border-radius: var(--hg-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.hg-kb-view-all {
  font-size: 13px;
  font-weight: 700;
  color: var(--hg-orange);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s;
}

.hg-kb-view-all:hover { gap: 8px; color: var(--hg-orange-dark); }

/* Grid */
.hg-kb-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Category Card — clean text-only design */
.hg-kb-cat-card {
  background: var(--hg-white);
  border: 1px solid var(--hg-gray-200);
  border-radius: var(--hg-radius-lg);
  padding: 24px 26px;
  text-decoration: none;
  display: block;
  transition: box-shadow 0.2s, transform 0.2s;
}

.hg-kb-cat-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

/* stray rule removed */

.hg-kb-cat-body {
  display: flex;
  flex-direction: column;
}

.hg-kb-cat-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--hg-gray-900);
  margin: 0 0 8px;
  line-height: 1.3;
  transition: color 0.15s;
}

.hg-kb-cat-card:hover .hg-kb-cat-name {
  color: var(--hg-orange);
}

.hg-kb-cat-desc {
  font-size: 13px;
  color: var(--hg-gray-500);
  line-height: 1.65;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.hg-kb-cat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.hg-kb-cat-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--hg-gray-100);
  color: var(--hg-gray-600);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--hg-radius-full);
  padding: 4px 10px;
  transition: background 0.2s, color 0.2s;
}

.hg-kb-cat-card:hover .hg-kb-cat-count {
  background: rgba(245, 114, 0, 0.1);
  color: var(--hg-orange);
}

.hg-kb-cat-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--hg-gray-400);
  transition: color 0.15s;
}

.hg-kb-cat-card:hover .hg-kb-cat-link {
  color: var(--hg-orange);
}

/* Hide old elements if still in DOM */
.hg-kb-cat-arrow,
.hg-kb-cat-icon { display: none; }

/* ═══════════════════════════════════════════════════════════════
   5. POPULAR ARTICLES SECTION
   ═══════════════════════════════════════════════════════════════ */
.hg-kb-popular {
  padding: 72px 0;
  background: var(--hg-white);
}

/* ═══════════════════════════════════════════════════════════════
   6 & 7. ARTICLE LIST & ITEM
   ═══════════════════════════════════════════════════════════════ */
.hg-kb-article-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid var(--hg-gray-200);
  border-radius: var(--hg-radius-lg);
  overflow: hidden;
  background: var(--hg-white);
}

.hg-kb-article-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  text-decoration: none;
  border-bottom: 1px solid var(--hg-gray-100);
  transition: background 0.15s;
  position: relative;
}

.hg-kb-article-item:last-child { border-bottom: none; }

.hg-kb-article-item:hover {
  background: var(--hg-gray-50);
}

.hg-kb-art-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--hg-radius-sm);
  background: rgba(245, 114, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hg-orange);
  margin-top: 2px;
  transition: background 0.15s, transform 0.15s;
}

.hg-kb-article-item:hover .hg-kb-art-arrow {
  background: var(--hg-orange);
  color: var(--hg-white);
  transform: translateX(2px);
}

.hg-kb-art-body { flex: 1; min-width: 0; }

.hg-kb-art-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--hg-gray-900);
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.15s;
}

.hg-kb-article-item:hover .hg-kb-art-title { color: var(--hg-orange); }

.hg-kb-art-excerpt {
  font-size: 12.5px;
  color: var(--hg-gray-500);
  line-height: 1.6;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hg-kb-art-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hg-kb-art-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 114, 0, 0.08);
  color: var(--hg-orange);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--hg-radius-full);
  padding: 3px 9px;
}

.hg-kb-art-date,
.hg-kb-art-views {
  font-size: 11.5px;
  color: var(--hg-gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   8. BREADCRUMB
   ═══════════════════════════════════════════════════════════════ */
.kb-breadcrumb {
  background: var(--hg-gray-50);
  border-bottom: 1px solid var(--hg-gray-200);
  padding: 12px 0;
}

.kb-breadcrumb-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
}

.kb-breadcrumb a {
  color: var(--hg-gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.kb-breadcrumb a:hover { color: var(--hg-orange); }

.kb-breadcrumb-sep {
  color: var(--hg-gray-400);
  display: flex;
  align-items: center;
}

.kb-breadcrumb-current {
  color: var(--hg-gray-900);
  font-weight: 700;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════════════
   9 & 10. SINGLE ARTICLE — LAYOUT & HEADER
   ═══════════════════════════════════════════════════════════════ */
.kb-article-wrap {
  padding: 52px 0 80px;
}

.kb-article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.kb-article-header {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1.5px solid var(--hg-gray-200);
}

.kb-article-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  font-weight: 900;
  color: var(--hg-gray-900);
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.kb-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.kb-art-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 114, 0, 0.09);
  border: 1px solid rgba(245, 114, 0, 0.2);
  color: var(--hg-orange);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--hg-radius-full);
  padding: 5px 12px;
  text-decoration: none;
}

.kb-art-cat-badge:hover {
  background: rgba(245, 114, 0, 0.14);
}

.kb-art-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--hg-gray-500);
}

.kb-art-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--hg-gray-300);
}

/* ═══════════════════════════════════════════════════════════════
   11. ARTICLE CONTENT
   ═══════════════════════════════════════════════════════════════ */
.kb-article-content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--hg-gray-700);
}

.kb-article-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--hg-gray-900);
  margin: 2.5em 0 0.75em;
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;
}

.kb-article-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--hg-gray-900);
  margin: 2em 0 0.6em;
  scroll-margin-top: 90px;
}

.kb-article-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hg-gray-800);
  margin: 1.75em 0 0.5em;
}

.kb-article-content p { margin: 0 0 1.25em; }

.kb-article-content ul,
.kb-article-content ol {
  padding-left: 1.6em;
  margin: 0 0 1.25em;
}

.kb-article-content li { margin-bottom: 0.45em; }

.kb-article-content ul li::marker { color: var(--hg-orange); }

.kb-article-content a {
  color: var(--hg-orange);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.kb-article-content a:hover {
  color: var(--hg-orange-dark, #d96200);
  text-decoration: underline;
  text-decoration-color: rgba(245, 114, 0, 0.5);
  text-underline-offset: 3px;
}

/* Code */
.kb-article-content code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.875em;
  background: var(--hg-gray-100);
  color: #c2185b;
  border-radius: 4px;
  padding: 2px 6px;
}

.kb-article-content pre {
  background: var(--hg-gray-900);
  border-radius: var(--hg-radius);
  padding: 22px 24px;
  overflow-x: auto;
  margin: 0 0 1.5em;
  border-left: 4px solid var(--hg-orange);
}

.kb-article-content pre code {
  font-size: 0.9em;
  background: none;
  color: #e5e7eb;
  padding: 0;
  border-radius: 0;
}

/* Blockquote */
.kb-article-content blockquote {
  border-left: 4px solid var(--hg-orange);
  background: rgba(245, 114, 0, 0.04);
  margin: 0 0 1.5em;
  padding: 16px 20px;
  border-radius: 0 var(--hg-radius) var(--hg-radius) 0;
  color: var(--hg-gray-700);
  font-style: italic;
}

.kb-article-content blockquote p { margin: 0; }

/* Tables */
.kb-article-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 0.93em;
  border-radius: var(--hg-radius);
}

.kb-article-content thead th {
  background: var(--hg-gray-900);
  color: var(--hg-white);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
}

.kb-article-content tbody tr:nth-child(even) { background: var(--hg-gray-50); }

.kb-article-content tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--hg-gray-200);
  color: var(--hg-gray-700);
}

/* Notice/Tip boxes */
.kb-article-content .kb-notice,
.kb-article-content .wp-block-info {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--hg-radius);
  margin: 0 0 1.5em;
  font-size: 0.94em;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--hg-gray-700);
}

.kb-article-content .kb-notice.kb-tip { background: rgba(245, 114, 0, 0.05); border-color: rgba(245, 114, 0, 0.2); }
.kb-article-content .kb-notice.kb-warn { background: rgba(245, 158, 11, 0.07); border-color: rgba(245, 158, 11, 0.25); }
.kb-article-content .kb-notice.kb-danger { background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.2); }

/* Images */
.kb-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--hg-radius);
  box-shadow: var(--hg-shadow-sm);
  margin: 0 0 1.25em;
}

/* ═══════════════════════════════════════════════════════════════
   12. TABLE OF CONTENTS (Sticky Sidebar)
   ═══════════════════════════════════════════════════════════════ */
/* Sidebar column: stacks TOC card + promo card */
.kb-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  position: sticky;
  top: 88px;
  visibility: hidden; /* shown by JS only when article has 2+ headings */
}

.kb-article-toc {
  background: var(--hg-white);
  border: 1px solid var(--hg-gray-200);
  border-radius: var(--hg-radius-lg);
  max-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Scrollable TOC list area */
.kb-toc-inner {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--hg-gray-200) transparent;
}

.kb-toc-inner::-webkit-scrollbar { width: 3px; }
.kb-toc-inner::-webkit-scrollbar-thumb { background: var(--hg-gray-200); border-radius: 2px; }

.kb-toc-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--hg-orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.kb-toc-title svg { color: var(--hg-orange); }


.kb-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kb-toc-list li a {
  display: block;
  font-size: 13px;
  color: var(--hg-gray-600);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--hg-radius-sm);
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}

.kb-toc-list li a:hover {
  background: rgba(245, 114, 0, 0.08);
  color: #c45e00;
}

.kb-toc-list li a.is-active {
  background: rgba(245, 114, 0, 0.12);
  color: var(--hg-orange);
  font-weight: 700;
}

/* H3 indent */
.kb-toc-list .toc-h3 a {
  padding-left: 22px;
  font-size: 12.5px;
}

/* TOC footer — always visible, never cut off */
.kb-toc-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--hg-gray-100);
  flex-shrink: 0;
}

/* ── Sidebar Hosting Promo Block ── */
.kb-sidebar-promo {
  margin: 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, #0a0f1e 0%, #1a1f35 100%);
  border-radius: var(--hg-radius-lg);
  overflow: hidden;
  flex-shrink: 0;
}

.kb-sidebar-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245,114,0,0.15);
  border: 1px solid rgba(245,114,0,0.35);
  color: #f57200;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

.kb-sidebar-promo-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.kb-sidebar-promo-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin: 0 0 14px;
}

.kb-sidebar-promo-desc strong {
  color: #f57200;
}

.kb-sidebar-promo-btn {
  display: block;
  text-align: center;
  background: var(--hg-orange);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 24px;
  padding: 9px 16px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.kb-sidebar-promo-btn:hover {
  background: var(--hg-orange-dark, #d96200);
  transform: translateY(-1px);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   13. WAS THIS HELPFUL?
   ═══════════════════════════════════════════════════════════════ */
.kb-helpful {
  margin-top: 48px;
  padding: 32px;
  background: var(--hg-gray-50);
  border: 1.5px solid var(--hg-gray-200);
  border-radius: var(--hg-radius-lg);
  text-align: center;
}

.kb-helpful-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--hg-gray-900);
  margin: 0 0 6px;
}

.kb-helpful-sub {
  font-size: 13.5px;
  color: var(--hg-gray-500);
  margin: 0 0 22px;
}

.kb-helpful-score {
  margin-bottom: 20px;
}

.kb-helpful-pct {
  font-size: 2rem;
  font-weight: 900;
  color: var(--hg-orange);
}

.kb-helpful-score-bar {
  width: 140px;
  height: 6px;
  background: var(--hg-gray-200);
  border-radius: var(--hg-radius-full);
  margin: 8px auto 0;
  overflow: hidden;
}

.kb-helpful-score-fill {
  height: 100%;
  background: linear-gradient(90deg, #f57200, #ff9c40);
  border-radius: var(--hg-radius-full);
  transition: width 0.6s ease;
}

.kb-helpful-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.kb-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  border-radius: var(--hg-radius-full);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.18s;
}

.kb-vote-btn-yes {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.25);
  color: #16a34a;
}

.kb-vote-btn-yes:hover {
  background: #16a34a;
  color: var(--hg-white);
  transform: translateY(-1px);
}

.kb-vote-btn-no {
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.kb-vote-btn-no:hover {
  background: #dc2626;
  color: var(--hg-white);
  transform: translateY(-1px);
}

.kb-helpful-thanks {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.kb-helpful-thanks.is-visible { display: flex; }

.kb-helpful-thanks-icon {
  width: 52px;
  height: 52px;
  background: rgba(22, 163, 74, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.kb-helpful-thanks p {
  font-size: 14px;
  color: var(--hg-gray-600);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   14. RELATED ARTICLES
   ═══════════════════════════════════════════════════════════════ */
.kb-related {
  margin-top: 52px;
}

.kb-related-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--hg-gray-900);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kb-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.kb-related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--hg-white);
  border: 1.5px solid var(--hg-gray-200);
  border-radius: var(--hg-radius-lg);
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.kb-related-card:hover {
  border-color: var(--hg-orange);
  box-shadow: 0 4px 20px rgba(245, 114, 0, 0.1);
  transform: translateY(-2px);
}

.kb-related-card-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--hg-orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kb-related-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--hg-gray-900);
  line-height: 1.4;
  transition: color 0.15s;
}

.kb-related-card:hover .kb-related-card-title { color: var(--hg-orange); }

.kb-related-card-meta {
  font-size: 11.5px;
  color: var(--hg-gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

/* ═══════════════════════════════════════════════════════════════
   15. BACK LINK
   ═══════════════════════════════════════════════════════════════ */
.kb-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--hg-gray-600);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 9px 16px;
  background: var(--hg-gray-100);
  border-radius: var(--hg-radius-full);
  transition: background 0.15s, color 0.15s, gap 0.15s;
  margin-bottom: 24px;
}

.kb-back-link:hover {
  background: var(--hg-gray-200);
  color: var(--hg-gray-900);
  gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORY ARCHIVE — Specific
   ═══════════════════════════════════════════════════════════════ */
.hg-kb-cat-hero {
  background: linear-gradient(135deg, #0a0f1e 0%, #111827 55%, #1a1f35 100%);
  padding: 60px 0 52px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hg-kb-cat-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(245, 114, 0, 0.07) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
}

.hg-kb-cat-hero-inner {
  position: relative;
  z-index: 2;
}

.hg-kb-cat-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(245, 114, 0, 0.12);
  border: 1px solid rgba(245, 114, 0, 0.3);
  color: var(--hg-orange);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--hg-radius-full);
  padding: 5px 14px;
  margin-bottom: 16px;
  text-decoration: none;
  transition: background 0.15s;
}

.hg-kb-cat-eyebrow:hover {
  background: rgba(245, 114, 0, 0.2);
}

.hg-kb-cat-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900;
  color: var(--hg-white);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.hg-kb-cat-hero-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.68);
  max-width: 460px;
  margin: 0 auto 18px;
  line-height: 1.7;
}

.hg-kb-cat-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--hg-radius-full);
  padding: 6px 14px;
}

/* Sub-category cards (thin) */
.hg-kb-subcats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}

.hg-kb-subcat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--hg-white);
  border: 1.5px solid var(--hg-gray-200);
  border-radius: var(--hg-radius);
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--hg-gray-800);
}

.hg-kb-subcat-card:hover {
  border-color: var(--hg-orange);
  box-shadow: var(--hg-shadow-sm);
  color: var(--hg-orange);
}

.hg-kb-subcat-emoji { font-size: 18px; }

.hg-kb-subcat-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--hg-gray-400);
  background: var(--hg-gray-100);
  border-radius: var(--hg-radius-full);
  padding: 2px 8px;
}

/* Pagination */
.hg-kb-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hg-kb-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--hg-radius);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  color: var(--hg-gray-700);
  background: var(--hg-white);
  border: 1.5px solid var(--hg-gray-200);
  transition: all 0.15s;
}

.hg-kb-pagination .page-numbers:hover {
  border-color: var(--hg-orange);
  color: var(--hg-orange);
}

.hg-kb-pagination .page-numbers.current {
  background: var(--hg-orange);
  border-color: var(--hg-orange);
  color: var(--hg-white);
}

.hg-kb-pagination .page-numbers.dots {
  border: none;
  background: none;
  color: var(--hg-gray-400);
}

/* CTA Band */
.hg-kb-cta-band {
  background: linear-gradient(135deg, var(--hg-gray-900) 0%, #1a1232 100%);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hg-kb-cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(245, 114, 0, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.hg-kb-cta-inner { position: relative; z-index: 2; }

.hg-kb-cta-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 900;
  color: var(--hg-white);
  margin: 0 0 10px;
}

.hg-kb-cta-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.68);
  margin: 0 0 28px;
}

.hg-kb-cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hg-kb-cta-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--hg-orange);
  color: var(--hg-white);
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 800;
  padding: 13px 28px;
  border-radius: var(--hg-radius-full);
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
}

.hg-kb-cta-btn-primary:hover {
  background: var(--hg-orange-dark);
  transform: translateY(-2px);
  color: var(--hg-white);
}

.hg-kb-cta-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: var(--hg-white);
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--hg-radius-full);
  text-decoration: none;
  transition: background 0.18s;
}

.hg-kb-cta-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--hg-white);
}

/* ═══════════════════════════════════════════════════════════════
/* ─── 1024px: Tablet ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hg-kb-cats-grid       { grid-template-columns: repeat(2, 1fr); }
  .kb-article-layout     { grid-template-columns: 1fr 260px; gap: 32px; }
}

/* ─── 768px: Mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hero */
  .hg-kb-hero            { padding: 52px 0 44px; }
  .hg-kb-hero-glow       { display: none; } /* saves paint budget on mobile */

  /* Category archive hero */
  .hg-kb-cat-hero        { padding: 40px 0 36px; }
  .hg-kb-cat-hero-desc   { font-size: 0.92rem; }

  /* Category grid */
  .hg-kb-cats-grid       { grid-template-columns: 1fr; }

  /* Article layout → single column; sidebar hidden on mobile */
  .kb-article-layout     { grid-template-columns: 1fr; }
  .kb-sidebar-col        { display: none; } /* TOC & promo hidden on mobile — article first */

  /* Related grid */
  .kb-related-grid       { grid-template-columns: 1fr; }

  /* Stats bar */
  .hg-kb-stats-inner     { gap: 20px; }
  .hg-kb-stat-divider    { display: none; }

  /* Search */
  .hg-kb-search-btn      { padding: 10px 18px; font-size: 13px; }

  /* Misc */
  .hg-kb-article-item    { padding: 14px 16px; }
  .kb-helpful            { padding: 24px 20px; }
  .kb-article-wrap       { padding: 28px 0 48px; }
  .hg-kb-section         { padding: 48px 0; }
  .hg-kb-popular         { padding: 48px 0; }
}

/* ─── 480px: Small phones ───────────────────────────────────── */
@media (max-width: 480px) {
  /* Hero */
  .hg-kb-hero            { padding: 40px 0 36px; }
  .hg-kb-hero h1         { font-size: 1.75rem !important; } /* overrides clamp() */

  /* Search bar: add breathing room from screen edges */
  .hg-kb-search-wrap     { padding: 0 12px; }

  /* Category archive hero */
  .hg-kb-cat-hero        { padding: 32px 0 28px; }

  /* Sections */
  .hg-kb-section         { padding: 36px 0; }
  .hg-kb-popular         { padding: 36px 0; }
  .kb-article-wrap       { padding: 20px 0 40px; }

  /* Article title */
  .kb-article-header h1  { font-size: 1.45rem; }

  /* Stats */
  .hg-kb-stats-inner     { gap: 12px 20px; }
  .hg-kb-stat-num        { font-size: 1.1rem; }
  .hg-kb-stat-lbl        { font-size: 11px; }

  /* Helpful */
  .kb-helpful-btns       { gap: 10px; }
  .kb-vote-btn           { padding: 10px 20px; font-size: 13px; }

  /* CTA */
  .hg-kb-cta-band        { padding: 40px 0; }

  /* Subcats */
  .hg-kb-subcats-grid    { grid-template-columns: 1fr; }
}

/* ─── 380px: Very narrow phones ─────────────────────────────── */
@media (max-width: 380px) {
  /* Stack search form vertically so button never clips */
  .hg-kb-search-form {
    flex-direction: column;
    border-radius: 16px;
    padding: 8px;
    gap: 6px;
  }
  .hg-kb-search-input    { padding: 12px 10px; font-size: 0.9rem; }
  .hg-kb-search-btn {
    width: 100%;
    border-radius: 12px;
    margin: 0;
    padding: 12px 20px;
    justify-content: center;
  }

  /* Hero title */
  .hg-kb-hero h1         { font-size: 1.5rem !important; }
}
