/*
 * HLB single-article presentation v1.0.91
 * Loaded after the Editorial Kit to keep article layout, TOC and metadata
 * consistent without adding inline CSS to individual posts.
 */

.hlb-article-main {
  min-width: 0;
  padding: 28px 32px 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(23, 32, 51, .05);
}

.hlb-article-content {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 16px !important;
  line-height: 1.75;
}

.hlb-article-content p,
.hlb-article-content li {
  font-size: 16px;
}

.hlb-article-header {
  margin-bottom: 24px;
}

.hlb-article-header h1 {
  margin-bottom: 16px;
}

/* Metadata and share actions belong to the article header, not the post body. */
.hlb-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 10px 12px;
  background: #f3f6fa;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  color: #526176;
  font-size: 13px;
  font-weight: 500;
}

.hlb-article-meta-info {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px 0;
  min-width: 0;
}

/* Reset the older generic .hlb-article-meta span rule from style.css. */
.hlb-article-meta span {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}

.hlb-article-meta .hlb-article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-right: 12px;
  margin-right: 12px;
  border-right: 1px solid #d6dde7;
}

.hlb-article-meta .hlb-article-meta-item:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}

.hlb-article-meta-item svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hlb-article-meta-item strong {
  color: #334155;
  font-weight: 700;
}

.hlb-article-meta-categories a {
  color: #384f9f;
  font-weight: 650;
}

.hlb-article-meta-categories a:hover,
.hlb-article-meta-categories a:focus-visible {
  color: #263a82;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hlb-article-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}

.hlb-article-share-label {
  margin-right: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.hlb-article-share .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hlb-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.hlb-share-button:hover,
.hlb-share-button:focus-visible {
  color: #fff;
  filter: brightness(.94);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(15, 23, 42, .14);
  outline: none;
}

.hlb-share-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hlb-share-facebook { background: #1877f2; }
.hlb-share-facebook svg { fill: currentColor; stroke: none; }
.hlb-share-linkedin { background: #0a66c2; }
.hlb-share-zalo { background: #0068ff; font-size: 15px; font-weight: 850; }
.hlb-share-copy { background: #64748b; }
.hlb-share-copy.is-copied { background: #15803d; }

/* Numbered H2 headings: same numbering is printed in the TOC by PHP. */
.hlb-article-content h2 {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  column-gap: 7px;
  margin: 40px 0 16px;
  padding: 3px 0 3px 13px;
  border-left: 4px solid #d71920;
  color: var(--brand-dark);
  font-size: 24px !important;
  line-height: 1.35;
}

.hlb-article-content h2:first-child {
  margin-top: 0;
}

.hlb-heading-number {
  display: block;
  padding-top: 0;
  color: #d71920;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
}

.hlb-heading-text {
  min-width: 0;
}

/* Compact numbered TOC with a clear current-section state. */
.hlb-article-toc-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hlb-article-toc-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 6px;
  align-items: start;
  margin: 0 !important;
  padding: 8px 9px !important;
  border-left: 3px solid transparent;
  border-radius: 7px;
  color: #334155;
  font-size: 13.5px;
  line-height: 1.42;
}

.hlb-article-toc-number {
  padding-top: 1px;
  color: #8793a5;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
}

.hlb-article-toc-text {
  min-width: 0;
}

.hlb-article-toc-link:hover,
.hlb-article-toc-link.is-active {
  background: #fff0f1;
  border-left-color: #d71920;
  color: #b91c1c;
  font-weight: 800;
}

.hlb-article-toc-link:hover .hlb-article-toc-number,
.hlb-article-toc-link.is-active .hlb-article-toc-number {
  color: #d71920;
}

/* Editorial Kit FAQ: compact vertical rhythm on desktop and mobile. */
.hlb-article-content .hlb-ek-faq {
  display: flex !important;
  flex-direction: column;
  gap: 4px !important;
  margin: 16px 0 22px !important;
}

.hlb-article-content .hlb-ek-faq-item {
  margin: 0 !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}

.hlb-article-content .hlb-ek-faq-item summary {
  min-height: 0 !important;
  padding: 10px 13px !important;
  font-size: 15.5px !important;
  line-height: 1.45 !important;
}

.hlb-article-content .hlb-ek-faq-item[open] summary {
  padding-bottom: 6px !important;
}

.hlb-article-content .hlb-ek-faq-item > p,
.hlb-article-content .hlb-ek-faq-item > div {
  margin: 0 !important;
  padding: 0 13px 11px !important;
  line-height: 1.62 !important;
}

/* Flatten nested Editorial Kit cards; retain only purposeful emphasis. */
.hlb-article-content .hlb-ek-box,
.hlb-article-content .hlb-ek-risk,
.hlb-article-content .hlb-ek-checklist {
  box-shadow: none !important;
}

@media (max-width: 1180px) and (min-width: 781px) {
  .hlb-article-main {
    padding: 24px 25px 30px;
  }
}

@media (max-width: 780px) {
  .hlb-article-main {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hlb-article-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .hlb-article-meta-info {
    width: 100%;
  }

  .hlb-article-meta-item {
    padding-right: 9px;
    margin-right: 9px;
  }

  .hlb-article-share {
    width: auto;
    margin-left: 0;
  }

  .hlb-article-share-label {
    margin-right: 4px;
  }

  .hlb-article-content h2 {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 6px;
    margin-top: 34px;
    padding-left: 10px;
    font-size: 24px !important;
  }

  .hlb-article-content .hlb-ek-faq {
    gap: 3px !important;
  }

  .hlb-article-content .hlb-ek-faq-item summary {
    padding: 9px 11px !important;
    font-size: 15px !important;
  }

  .hlb-article-content .hlb-ek-faq-item > p,
  .hlb-article-content .hlb-ek-faq-item > div {
    padding: 0 11px 10px !important;
    font-size: 15px !important;
  }
}

/* Compatibility with article V4 content that previously carried inline CSS/JS.
 * These higher-specificity rules prevent duplicate heading/TOC numbers until
 * the clean article HTML is pasted into WordPress.
 */
.single-post .hlb-article-content .hlb-cost-article h2[id] {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) !important;
  align-items: start !important;
  column-gap: 7px !important;
  margin: 40px 0 16px !important;
  padding: 3px 0 3px 13px !important;
  border: 0 !important;
  border-left: 4px solid #d71920 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 24px !important;
  line-height: 1.35 !important;
}

.single-post .hlb-article-content .hlb-cost-article h2[id]::before {
  content: none !important;
  display: none !important;
}

.single-post .hlb-article-toc a.hlb-article-toc-link.hlb-toc-link {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  column-gap: 5px !important;
  align-items: start !important;
  margin: 0 !important;
  padding: 8px 9px !important;
  border: 0 !important;
  border-left: 3px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #334155 !important;
  font-size: 13.5px !important;
  line-height: 1.42 !important;
  text-decoration: none !important;
}

.single-post .hlb-article-toc a.hlb-article-toc-link.hlb-toc-link::before {
  content: none !important;
  display: none !important;
}

.single-post .hlb-article-toc a.hlb-article-toc-link.hlb-toc-link:hover,
.single-post .hlb-article-toc a.hlb-article-toc-link.hlb-toc-link.is-active,
.single-post .hlb-article-toc a.hlb-article-toc-link.hlb-toc-link.hlb-is-active {
  background: #fff0f1 !important;
  border-left-color: #d71920 !important;
  color: #b91c1c !important;
  font-weight: 800 !important;
}

@media (max-width: 780px) {
  .single-post .hlb-article-content .hlb-cost-article h2[id] {
    grid-template-columns: max-content minmax(0, 1fr) !important;
    column-gap: 6px !important;
    margin-top: 34px !important;
    padding-left: 10px !important;
  }
}
