/* =====================================================
   Host & Tech — KB Homepage Styles
   Loaded only on the KB Homepage template
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0A1628;
  --navy-mid:   #0F2040;
  --teal:       #0EA5E9;
  --teal-light: #38BDF8;
  --teal-pale:  #E0F7FF;
  --slate:      #1E293B;
  --muted:      #64748B;
  --border:     #E2E8F0;
  --bg:         #F8FAFC;
  --white:      #FFFFFF;
  --card-hover: #F0F9FF;
  --font:       'Plus Jakarta Sans', sans-serif;
  --mono:       'JetBrains Mono', monospace;
}

/* ─── RESET body for KB templates ─── */
body.ht-kb-page {
  font-family: var(--font);
  background: var(--bg);
  color: var(--slate);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.ht-kb-page #page,
.ht-kb-page .site-content,
.ht-kb-page .ast-container {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

body.ht-kb-page main {
  flex: 1 0 auto;
}

body.ht-kb-page .ht-kb-footer {
  margin-top: auto;
}

/* ─── TOP BAR ─── */
.ht-topbar {
  background: var(--navy);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 9999;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.ht-topbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.ht-logo-image {
  display: block;
  height: 34px;
  width: auto;
  max-width: 220px;
}
.ht-topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ht-topbar-nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  transition: color 0.2s;
}
.ht-topbar-nav a:hover,
.ht-topbar-nav a.ht-active { color: white; }
.ht-topbar-nav a.ht-active { color: var(--teal); }
.ht-topbar-btn {
  background: var(--teal) !important;
  color: white !important;
  padding: 7px 18px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: background 0.2s !important;
}
.ht-topbar-btn:hover { background: var(--teal-light) !important; color: var(--navy) !important; }

/* ─── HERO ─── */
.ht-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 60%, #0c2d50 100%);
  padding: 72px 40px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ht-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 50% 0%, rgba(14,165,233,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 400px 200px at 80% 100%, rgba(14,165,233,0.07) 0%, transparent 60%);
  pointer-events: none;
}
.ht-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(14,165,233,0.12);
  border: 1px solid rgba(14,165,233,0.3);
  color: var(--teal-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  font-family: var(--font);
}
.ht-hero-eyebrow svg { width: 13px; height: 13px; fill: var(--teal-light); }
.ht-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: white;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
  position: relative;
  font-family: var(--font);
}
.ht-hero h1 em {
  font-style: normal;
  color: var(--teal);
}
.ht-hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.6;
  font-family: var(--font);
}

/* Search */
.ht-search-wrap {
  max-width: 580px;
  margin: 0 auto;
  position: relative;
}
.ht-search-wrap input,
.ht-kb-search-input {
  width: 100%;
  padding: 16px 56px 16px 52px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.07);
  color: white;
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}
.ht-kb-search-input::placeholder { color: rgba(255,255,255,0.35); }
.ht-kb-search-input:focus {
  border-color: var(--teal);
  background: rgba(255,255,255,0.1);
}
.ht-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}
.ht-kb-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--teal);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.ht-kb-search-btn:hover { background: var(--teal-light); color: var(--navy); }
.ht-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.ht-search-tag {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font);
}
.ht-search-tag:hover {
  color: var(--teal-light);
  border-color: rgba(14,165,233,0.4);
  background: rgba(14,165,233,0.08);
}

/* ─── STATS BAR ─── */
.ht-stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.ht-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0;
}
.ht-stat-icon {
  width: 36px;
  height: 36px;
  background: var(--teal-pale);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ht-stat-icon svg {
  width: 17px;
  height: 17px;
  stroke: var(--teal);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.ht-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
  font-family: var(--font);
  line-height: 1.2;
}
.ht-stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  font-family: var(--font);
}

/* ─── MAIN CONTENT ─── */
.ht-kb-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 40px 80px;
}
.ht-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
  font-family: var(--font);
}
.ht-section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  font-family: var(--font);
}
.ht-section-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  font-family: var(--font);
}

/* ─── CATEGORY GRID ─── */
.ht-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}
.ht-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 26px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}
.ht-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  opacity: 0;
  transition: opacity 0.2s;
}
.ht-card:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 32px rgba(14,165,233,0.12);
  transform: translateY(-2px);
  background: var(--card-hover);
}
.ht-card:hover::after { opacity: 1; }
.ht-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ht-card-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Icon colour variants */
.ht-ic-teal   { background: #E0F7FF; } .ht-ic-teal   svg { stroke: #0EA5E9; fill: none; }
.ht-ic-green  { background: #DCFCE7; } .ht-ic-green  svg { stroke: #16A34A; fill: none; }
.ht-ic-violet { background: #EDE9FE; } .ht-ic-violet svg { stroke: #7C3AED; fill: none; }
.ht-ic-amber  { background: #FEF3C7; } .ht-ic-amber  svg { stroke: #D97706; fill: none; }
.ht-ic-rose   { background: #FFE4E6; } .ht-ic-rose   svg { stroke: #E11D48; fill: none; }
.ht-ic-indigo { background: #E0E7FF; } .ht-ic-indigo svg { stroke: #4F46E5; fill: none; }
.ht-ic-orange { background: #FFEDD5; } .ht-ic-orange svg { stroke: #EA580C; fill: none; }
.ht-ic-navy   { background: #DBEAFE; } .ht-ic-navy   svg { stroke: #1D4ED8; fill: none; }
.ht-ic-pine   { background: #DCFCE7; } .ht-ic-pine   svg { stroke: #15803D; fill: none; }
.ht-ic-sky    { background: #E0F2FE; } .ht-ic-sky    svg { stroke: #0284C7; fill: none; }

.ht-card-body { flex: 1; }
.ht-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
  font-family: var(--font);
}
.ht-card-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  font-family: var(--font);
}
.ht-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.ht-card-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--mono);
}
.ht-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.ht-card-arrow svg {
  width: 14px;
  height: 14px;
  stroke: var(--teal);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.ht-card:hover .ht-card-arrow { background: var(--teal); transform: translateX(2px); }
.ht-card:hover .ht-card-arrow svg { stroke: white; }

/* ─── POPULAR ARTICLES ─── */
.ht-article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
  margin-bottom: 56px;
}
.ht-article-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--slate);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ht-article-item:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--card-hover);
}
.ht-article-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}
.ht-article-item span { flex: 1; }
.ht-article-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  flex-shrink: 0;
  opacity: 0.5;
}

/* ─── CTA BANNER ─── */
.ht-cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: 16px;
  padding: 48px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.ht-cta-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(14,165,233,0.15), transparent 70%);
  pointer-events: none;
}
.ht-cta-text h3 {
  font-size: 24px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  font-family: var(--font);
}
.ht-cta-text p {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  max-width: 440px;
  font-family: var(--font);
}
.ht-cta-actions { display: flex; gap: 12px; flex-shrink: 0; }
.ht-btn-primary {
  background: var(--teal);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  line-height: 1.2;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  transition: background 0.2s;
  white-space: nowrap;
}
.ht-btn-primary:hover { background: var(--teal-light); color: var(--navy); text-decoration: none; }
.ht-btn-primary:visited,
.ht-btn-primary:active,
.ht-btn-primary:focus { color: white; text-decoration: none; }
.ht-btn-ghost {
  background: rgba(255,255,255,0.08);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  line-height: 1.2;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.2s;
  white-space: nowrap;
}
.ht-btn-ghost:hover { background: rgba(255,255,255,0.14); color: white; text-decoration: none; }
.ht-btn-ghost:visited,
.ht-btn-ghost:active,
.ht-btn-ghost:focus { color: white; text-decoration: none; }

/* ─── KB FOOTER ─── */
.ht-kb-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 24px 40px;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font);
}
.ht-kb-footer a { color: var(--teal); text-decoration: none; }

/* ─── SEARCH RESULTS PAGE ─── */
.ht-search-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 70%, #0c2d50 100%);
  padding: 48px 40px;
  text-align: center;
}

.ht-search-title {
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.8px;
  margin-bottom: 18px;
  font-family: var(--font);
}

.ht-search-form {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ht-search-input {
  flex: 1;
  height: 50px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  background: rgba(255,255,255,0.98);
  padding: 0 16px;
  font-size: 15px;
  color: var(--slate);
  font-family: var(--font);
}

.ht-search-submit {
  height: 50px;
  border: 0;
  border-radius: 10px;
  padding: 0 22px;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
}

.ht-search-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px 52px;
}

.ht-search-count {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
  font-family: var(--font);
}

.ht-search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ht-search-result-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ht-search-result-item:hover {
  border-color: rgba(14,165,233,0.45);
  box-shadow: 0 6px 18px rgba(15, 32, 64, 0.08);
  transform: translateY(-1px);
}

.ht-search-result-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
  font-family: var(--font);
}

.ht-search-result-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
  font-family: var(--font);
}

.ht-search-result-title a {
  color: var(--navy);
  text-decoration: none;
}

.ht-search-result-title a:hover {
  color: #0b7fbe;
}

.ht-search-result-excerpt {
  margin: 0 0 11px;
  color: #334155;
  font-size: 15px;
  line-height: 1.6;
  font-family: var(--font);
}

.ht-search-readmore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(14,165,233,0.11);
  border: 1px solid rgba(14,165,233,0.34);
  color: #046594;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  border-radius: 8px;
  padding: 8px 12px;
}

.ht-search-pagination {
  margin-top: 22px;
}

.ht-search-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  margin: 0 4px 6px 0;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--slate);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.ht-search-pagination .page-numbers.current {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.ht-search-empty {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 26px;
  text-align: center;
}

.ht-search-empty h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--navy);
  font-family: var(--font);
}

.ht-search-empty p {
  color: var(--muted);
  font-size: 15px;
  font-family: var(--font);
}
.ht-kb-footer a:hover { color: var(--teal-light); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .ht-topbar { padding: 0 20px; }
  .ht-topbar-nav { display: none; }
  .ht-hero { padding: 48px 20px 56px; }
  .ht-stats-bar { gap: 24px; padding: 0 20px; }
  .ht-kb-main { padding: 36px 20px 60px; }
  .ht-grid { grid-template-columns: 1fr 1fr; }
  .ht-cta-banner { flex-direction: column; padding: 36px 28px; }
  .ht-cta-actions { flex-direction: column; width: 100%; }
}
@media (max-width: 560px) {
  .ht-grid { grid-template-columns: 1fr; }
  .ht-article-list { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────
   FAQ SECTION (Auto-generated posts)
─────────────────────────────────────────────── */
.ht-faq-section {
  margin: 3rem 0;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #0EA5E9;
}

.ht-faq-section > h2 {
  color: #0A1628;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.ht-faq-item {
  margin-bottom: 1.5rem;
}

.ht-faq-item:last-child {
  margin-bottom: 0;
}

.ht-faq-question {
  color: #0EA5E9;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.ht-faq-answer {
  color: #475569;
  line-height: 1.7;
}

.ht-faq-answer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .ht-faq-section {
    padding: 1.5rem;
  }
  
  .ht-faq-section > h2 {
    font-size: 1.5rem;
  }
  
  .ht-faq-question {
    font-size: 1.05rem;
  }
}

/* ───────────────────────────────────────────────
   CODE SNIPPET WITH COPY BUTTON (Carbon Design System Style)
─────────────────────────────────────────────── */
.ht-code-snippet {
  position: relative;
  margin: 1rem 0;
  background: #161616;
  border-radius: 10px;
  padding-left: 10px;
  overflow: hidden;
}

/* Keep stacked code blocks visually separated on article pages */
.single .entry-content .ht-code-snippet + .ht-code-snippet {
  margin-top: 1rem;
}

.single .entry-content pre {
  margin: 1rem 0;
}

.single .entry-content pre + pre {
  margin-top: 1rem;
}

.ht-code-snippet__copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: transparent;
  border: none;
  color: #f4f4f4;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  font-size: 14px;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border-radius: 4px;
  transition: background 70ms cubic-bezier(0, 0, 0.38, 0.9);
}

.ht-code-snippet__copy:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ht-code-snippet__copy:active {
  background: rgba(255, 255, 255, 0.2);
}

.ht-code-snippet__copy:focus {
  outline: 2px solid #0f62fe;
  outline-offset: -2px;
}

/* Icon states */
.ht-code-snippet__copy .ht-copy-icon {
  display: block;
  flex-shrink: 0;
}

.ht-code-snippet__copy .ht-check-icon {
  display: none;
  flex-shrink: 0;
}

.ht-code-snippet__copy.copied .ht-copy-icon {
  display: none;
}

.ht-code-snippet__copy.copied .ht-check-icon {
  display: block;
  animation: fadeInCheck 200ms cubic-bezier(0, 0, 0.38, 0.9);
}

@keyframes fadeInCheck {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Feedback tooltip */
.ht-code-snippet__feedback {
  position: absolute;
  top: 8px;
  right: 50px;
  background: #262626;
  color: #f4f4f4;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 150ms cubic-bezier(0, 0, 0.38, 0.9), transform 150ms cubic-bezier(0, 0, 0.38, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ht-code-snippet__feedback::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -4px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid #262626;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.ht-code-snippet__feedback.show {
  opacity: 1;
  transform: translateY(0);
}

/* Code block */
.ht-code-snippet__code {
  margin: 0;
  padding: 16px;
  padding-top: 40px; /* Space for button */
  background: #161616;
  overflow-x: auto;
  border-radius: 0;
}

.ht-code-snippet__code code {
  font-family: 'IBM Plex Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  color: #f4f4f4;
  background: transparent;
}

/* Prism.js compatibility - ensure dark background */
.ht-code-snippet__code[class*="language-"],
.ht-code-snippet__code code[class*="language-"] {
  background: #161616 !important;
}

@media (max-width: 560px) {
  .ht-code-snippet__copy {
    padding: 6px;
    top: 6px;
    right: 6px;
  }
  
  .ht-code-snippet__copy .ht-copy-icon,
  .ht-code-snippet__copy .ht-check-icon {
    width: 14px;
    height: 14px;
  }
  
  .ht-code-snippet__feedback {
    font-size: 12px;
    padding: 4px 8px;
    right: 40px;
  }
  
  .ht-code-snippet__code {
    padding: 12px;
    padding-top: 36px;
    font-size: 13px;
  }
}

/* ───────────────────────────────────────────────
   ARTICLE META BAR (Summarize + Reading Time)
─────────────────────────────────────────────── */
.ht-article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 16px;
}

.ht-summarize {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ht-summarize-label {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.ht-ai-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ht-ai-tool {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.ht-ai-tool:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ht-ai-tool svg {
  width: 18px;
  height: 18px;
  color: white;
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.ht-reading-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #64748b;
  white-space: nowrap;
}

.ht-update-date {
  font-weight: 500;
}

.ht-separator {
  color: #cbd5e1;
  font-weight: 300;
}

.ht-read-time {
  font-weight: 600;
  color: #0EA5E9;
}

@media (max-width: 640px) {
  .ht-article-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }
  
  .ht-summarize {
    width: 100%;
  }
  
  .ht-summarize-label {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .ht-ai-tools {
    width: 100%;
    justify-content: flex-start;
  }
  
  .ht-ai-tool {
    width: 32px;
    height: 32px;
  }
  
  .ht-ai-tool svg {
    width: 16px;
    height: 16px;
  }
  
  .ht-reading-time {
    font-size: 13px;
  }
}

/* ───────────────────────────────────────────────
   SOCIAL SHARING SECTION
─────────────────────────────────────────────── */
.ht-share-section {
  margin: 3rem 0 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e2e8f0;
}

.ht-share-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #475569;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.ht-share-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ht-share-btn {
  width: 48px;
  height: 48px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  color: #64748b;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ht-share-copy-icon {
  font-size: 18px;
  line-height: 1;
  display: inline-block;
}

.ht-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #cbd5e1;
}

.ht-share-copy:hover {
  background: #f1f5f9;
  color: #0EA5E9;
  border-color: #0EA5E9;
}

.ht-share-twitter:hover {
  background: #000000;
  color: white;
  border-color: #000000;
}

.ht-share-linkedin:hover {
  background: #0077b5;
  color: white;
  border-color: #0077b5;
}

.ht-share-facebook:hover {
  background: #1877f2;
  color: white;
  border-color: #1877f2;
}

.ht-share-email:hover {
  background: #ea4335;
  color: white;
  border-color: #ea4335;
}

@media (max-width: 640px) {
  .ht-share-btn {
    width: 44px;
    height: 44px;
  }
  
  .ht-share-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* ───────────────────────────────────────────────
   RELATED ARTICLES SECTION
─────────────────────────────────────────────── */
.ht-related-section {
  margin: 2rem 0;
  padding: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.ht-related-title {
  font-size: 18px;
  font-weight: 700;
  color: #0A1628;
  margin-bottom: 16px;
}

.ht-related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ht-related-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #1e293b;
  transition: all 0.2s ease;
}

.ht-related-item:hover {
  border-color: #0EA5E9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
  transform: translateX(4px);
}

.ht-related-item svg {
  flex-shrink: 0;
  color: #0EA5E9;
  margin-top: 2px;
}

.ht-related-item span {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.ht-related-item:hover span {
  color: #0EA5E9;
}

@media (max-width: 640px) {
  .ht-related-section {
    padding: 16px;
  }
  
  .ht-related-title {
    font-size: 16px;
  }
  
  .ht-related-item {
    padding: 10px;
  }
  
  .ht-related-item svg {
    width: 16px;
    height: 16px;
  }
  
  .ht-related-item span {
    font-size: 14px;
  }
}
