/*
 * blog.desktop.css - Blog index + post detail, viewport >=1024px
 * Category: blog (storefront)
 * Prefix: ti- (blog index), post-* / titledetail / userdetail (post detail)
 */

/* Page wrapper */
.ti-page {
  background: var(--color-bg-soft, #F7F8FA);
  min-height: 60vh;
}

/* Page header */
.ti-page-header {
  background: transparent;
  border-bottom: none;
  padding: 16px 0 4px;
}

/* Page title (H1) */
.ti-page-title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text, #1F2937);
  letter-spacing: -.3px;
}

/* Category tabs */
.ti-cats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.ti-cats__label {
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  color: var(--color-text-muted, #6B7280);
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.ti-cat {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s;
}
.ti-cat:hover { color: var(--color-primary, #C8102E); text-decoration: none; }
.ti-cat--active { color: var(--color-primary, #C8102E); font-weight: 700; }

/* Body */
.ti-body {
  padding-top: 16px;
  padding-bottom: 60px;
}

/* 2-column grid - 2 cols on desktop */
.ti-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* Placeholder no-image */
.ti-ph {
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(135deg, #FDE8EC 0%, #fff4f5 100%);
}
.ti-ph svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Image common reset */
.ti-hero-card__img,
.ti-feed-row__img,
.ti-popular-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

/* Hero card */
.ti-hero-card {
  background: #fff;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ti-hero-card__thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #FDE8EC;
}
.ti-hero-card:hover .ti-hero-card__img { transform: scale(1.03); }

.ti-hero-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ti-hero-card__title {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--color-text, #1F2937);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ti-hero-card__title a { color: inherit; text-decoration: none; }
.ti-hero-card:hover .ti-hero-card__title a { color: var(--color-primary, #C8102E); }

.ti-hero-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

/* Feed list — TGDĐ-style: list dọc, mỗi bài 1 hàng ngang (thumb trái + body phải) */
.ti-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ti-feed-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.ti-feed-row:hover {
  box-shadow: 0 4px 16px rgba(16, 24, 40, .10);
  border-color: #FBC8D0;
}

/* Thumb: cố định 280px, tỉ lệ 16:9 → ~157px height */
.ti-feed-row__thumb {
  display: block;
  flex-shrink: 0;
  width: 280px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #FDE8EC;
  align-self: stretch;
}

.ti-feed-row:hover .ti-feed-row__img { transform: scale(1.04); }

.ti-feed-row__body {
  flex: 1;
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ti-feed-row__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  color: var(--color-text, #1F2937);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ti-feed-row__title a { color: inherit; text-decoration: none; }
.ti-feed-row:hover .ti-feed-row__title a { color: var(--color-primary, #C8102E); }

/* Empty state */
.ti-empty {
  text-align: center;
  padding: 60px 24px;
  background: #fff;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 10px;
  color: var(--color-text-muted, #6B7280);
  font-size: 15px;
  line-height: 1.7;
}
.ti-empty__link {
  color: var(--color-primary, #C8102E);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 12px;
}
.ti-empty__link:hover { text-decoration: underline; }

/* Sidebar - sticky on desktop
 * Only .site-header is sticky (top:0, 82px). Topbar + nav scroll away.
 * OFFSET = header-height + 16px breathing room = 98px.
 * align-self:start prevents grid stretch (which would break sticky).
 * max-height guards against future long sidebar content. */
.ti-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-height, 82px) + 16px);
  align-self: start;
  max-height: calc(100vh - var(--header-height, 82px) - 32px);
  overflow-y: auto;
}

/* Sidebar box */
.ti-sidebar-box {
  background: #fff;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 10px;
  overflow: hidden;
}

.ti-sidebar-box__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
}

.ti-sidebar-box__bar {
  width: 3px;
  height: 16px;
  background: var(--color-primary, #C8102E);
  border-radius: 2px;
  flex-shrink: 0;
}

.ti-sidebar-box__title {
  font-size: 13.5px;
  font-weight: 800;
  margin: 0;
  color: var(--color-text, #1F2937);
  letter-spacing: -0.01em;
}

/* Popular list */
.ti-popular-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ti-popular-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border, #E5E7EB);
  transition: background .15s;
}
.ti-popular-item:last-child { border-bottom: none; }
.ti-popular-item:hover { background: var(--color-bg-soft, #F7F8FA); }

.ti-popular-item__num {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text-muted, #9CA3AF);
  line-height: 1;
  padding-top: 2px;
}
/* Top 3 */
.ti-popular-item__num--top {
  color: var(--color-primary, #C8102E);
}

.ti-popular-item__thumb {
  flex-shrink: 0;
  width: 60px;
  height: 45px;
  display: block;
  overflow: hidden;
  background: #FDE8EC;
  border-radius: 4px;
}
.ti-popular-item:hover .ti-popular-item__img { transform: scale(1.05); }

.ti-popular-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ti-popular-item__title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text, #1F2937);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ti-popular-item:hover .ti-popular-item__title { color: var(--color-primary, #C8102E); }

.ti-popular-item__date {
  font-size: 10.5px;
  color: var(--color-text-muted, #6B7280);
}

/* Category list sidebar */
.ti-cat-list {
  list-style: none;
  margin: 0;
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ti-cat-list__item {}

.ti-cat-list__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text, #1F2937);
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s, color .15s;
  gap: 6px;
}
.ti-cat-list__link svg { color: var(--color-text-muted, #9CA3AF); flex-shrink: 0; }
.ti-cat-list__link:hover { background: #FDE8EC; color: var(--color-primary, #C8102E); text-decoration: none; }
.ti-cat-list__link:hover svg { color: var(--color-primary, #C8102E); }
.ti-cat-list__link--active { background: #FDE8EC; color: var(--color-primary, #C8102E); font-weight: 700; }
.ti-cat-list__link--active svg { color: var(--color-primary, #C8102E); }

.ti-cat-list__count {
  font-size: 11px;
  color: var(--color-text-muted, #9CA3AF);
  margin-left: auto;
  background: var(--color-bg-soft, #F7F8FA);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
}

/* Feed row meta */
.ti-feed-row__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 4px;
  flex-wrap: wrap;
}

.ti-feed-row__author {
  font-size: 11.5px;
  color: var(--color-text-muted, #6B7280);
  font-weight: 600;
  white-space: nowrap;
}

.ti-feed-row__time {
  font-size: 11.5px;
  color: var(--color-text-muted, #6B7280);
  white-space: nowrap;
}

.ti-feed-row__meta-sep {
  font-size: 11px;
  color: var(--color-text-soft, #9CA3AF);
  line-height: 1;
}

/* Load more */
.ti-load-more-wrap {
  text-align: center;
  padding: 20px 0 8px;
}

.ti-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 28px;
  background: #fff;
  border: 2px solid var(--color-primary, #C8102E);
  border-radius: 6px;
  color: var(--color-primary, #C8102E);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.ti-load-more-btn:hover:not(:disabled) {
  background: var(--color-primary, #C8102E);
  color: #fff;
}
.ti-load-more-btn:disabled {
  opacity: .6;
  cursor: default;
}

/* Category heading */
.ti-cat-heading {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  color: var(--color-primary, #C8102E);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.15;
}
.ti-cat-heading__hash {
  color: var(--color-primary, #C8102E);
  margin-right: 2px;
}

/* Latest block */
.ti-latest-block {
  background: #fff;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ti-latest-block__label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text-muted, #6B7280);
  border-bottom: 1px solid var(--color-border, #E5E7EB);
}
.ti-latest-block__bar {
  width: 3px;
  height: 14px;
  background: var(--color-primary, #C8102E);
  border-radius: 2px;
  flex-shrink: 0;
}

.ti-latest-block__grid {
  display: grid;
  gap: 0;
}

.ti-latest-item {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border, #E5E7EB);
  transition: background .15s;
}
.ti-latest-item:last-child { border-right: none; }
.ti-latest-item:hover { background: var(--color-bg-soft, #F7F8FA); }

.ti-latest-item__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #FDE8EC;
}
.ti-latest-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.ti-latest-item:hover .ti-latest-item__img { transform: scale(1.03); }

.ti-latest-item__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.ti-latest-item__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-text, #1F2937);
}
.ti-latest-item__title a { color: inherit; text-decoration: none; }
.ti-latest-item:hover .ti-latest-item__title a { color: var(--color-primary, #C8102E); }

.ti-latest-item--main .ti-latest-item__title {
  font-size: 17px;
  -webkit-line-clamp: 4;
}

/* Post detail - title + meta (desktop base values) */
.titledetail {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--color-text, #1F2937);
  margin: 0 0 14px;
}

.userdetail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 13px;
  color: var(--color-text-muted, #6B7280);
  margin: 0;
}

.userdetail__contrib strong {
  color: var(--color-text, #1F2937);
  font-weight: 700;
}

.userdetail__sep {
  color: var(--color-text-soft, #9CA3AF);
  font-size: 12px;
}

.userdetail__time {
  font-size: 12.5px;
  color: var(--color-text-muted, #6B7280);
}

/* Post topic chip */
.post-topic {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-primary, #C8102E);
  text-decoration: none;
  margin-bottom: 10px;
}
.post-topic:hover { text-decoration: underline; }

/* Post hero */
.post-hero {
  background: #fff;
  padding: 20px 0 0;
}
.post-hero .container {
  max-width: 840px;
}
.post-hero .breadcrumb {
  margin-bottom: 18px;
}

/* Post body */
.post-body-wrap {
  max-width: 840px;
  margin: 40px auto;
  padding: 0 20px;
}

.post-layout {
  display: block;
}

.post-main {}

/* Prose content */
.post-content {
  line-height: 1.8;
  font-size: 16px;
  color: var(--color-text);
}
.post-content h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 32px 0 16px;
  color: var(--color-text);
  scroll-margin-top: 80px;
}
.post-content h3 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--color-text);
  scroll-margin-top: 80px;
}
.post-content h4 {
  font-size: var(--font-size-base);
  font-weight: 700;
  margin: var(--space-6) 0 var(--space-2);
  scroll-margin-top: 80px;
}
.post-content p {
  margin: 0 0 16px;
}
.post-content ul,
.post-content ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.post-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.post-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-content a:hover { color: var(--color-primary-dark); }
.post-content strong { font-weight: 700; }
.post-content em { font-style: italic; }
.post-content img {
  max-width: 100%;
  border-radius: var(--radius-xl);
  height: auto;
  display: block;
  margin: 20px auto;
}
.post-content figure {
  margin: 32px 0;
}
.post-content figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 10px;
}
.post-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 20px 24px;
  margin: 28px 0;
  background: var(--color-bg-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
}
.post-content blockquote p { margin: 0; }
.post-content blockquote cite,
.post-content blockquote footer {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: normal;
  font-weight: 400;
  margin-top: 12px;
}
/* table always display:table on desktop */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: var(--font-size-sm);
  display: table;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-10);
  overflow: hidden;
}
.post-content th,
.post-content td {
  padding: 12px 16px;
  border: 1px solid var(--color-border-soft, #F1F2F4);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}
.post-content th {
  background: var(--color-bg-soft);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.post-content tr:nth-child(even) td { background: var(--color-bg-soft); }

/* Prose table wrapper */
.post-content .prose-table {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-10);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.post-content .prose-table::-webkit-scrollbar { height: 6px; }
.post-content .prose-table::-webkit-scrollbar-track { background: transparent; }
.post-content .prose-table::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 999px; }
.post-content .prose-table::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }
.post-content .prose-table > table {
  display: table;
  width: 100%;
  min-width: 620px;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.post-content .prose-table > table th,
.post-content .prose-table > table td { white-space: nowrap; }

/* Callout info */
.post-content .callout-info {
  margin: 24px 0;
  padding: 18px;
  background: #DBEAFE;
  border-radius: var(--radius-10);
  border-left: 4px solid #2563EB;
  display: flex;
  gap: 12px;
}
.post-content .callout-info__icon {
  flex-shrink: 0;
  color: #2563EB;
  margin-top: 2px;
}
.post-content .callout-info__title {
  font-size: 14px;
  font-weight: 700;
  color: #2563EB;
  margin-bottom: 4px;
}
.post-content .callout-info__body {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.65;
}

/* FAQ */
.post-content .faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-10);
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}
.post-content .faq-question {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  color: var(--color-text);
  gap: 10px;
}
.post-content .faq-question::after {
  content: '';
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  flex-shrink: 0;
  transition: transform .25s ease;
}
.post-content .faq-item.is-open .faq-question::after { transform: rotate(180deg); }
.post-content .faq-answer {
  padding: 0 18px 16px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  display: none;
}
.post-content .faq-item.is-open .faq-answer { display: block; }
.post-share__btn--copy.copied { background: var(--color-success, #16A34A); color: #fff; border-color: var(--color-success, #16A34A); }

/* Related posts */
.post-related {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}
.post-related__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.post-related__title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.025em;
  color: var(--color-text);
}
.post-related__view-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.post-related__view-all:hover { text-decoration: underline; }
/* 3-column grid on desktop */
.post-related__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}

.post-related__card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow var(--transition);
  background: #fff;
}
.post-related__card:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.post-related__card-img-wrap {
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #FDE8EC 0%, #fff 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-related__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.post-related__card:hover .post-related__card-img { transform: scale(1.04); }
.post-related__card-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.post-related__card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.post-related__card-cat-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
}

.post-related__card-cat {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary-dark, #9E0C24);
  background: #FDE8EC;
  border: 1px solid #FBC8D0;
  padding: 2px 8px;
  border-radius: var(--radius-6);
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.post-related__card-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--color-text-muted);
}
.post-related__card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: var(--color-text);
}
.post-related__card:hover .post-related__card-title { color: var(--color-primary); }
.post-toc__link {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.4;
  border-left: 3px solid transparent;
  border-radius: var(--radius-6);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.post-toc__link:hover,
.post-toc__link.is-active {
  color: var(--color-primary);
  background: #FDE8EC;
  border-left-color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

/* Mobile TOC - present in all viewports incl. desktop */
.post-toc-mobile {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-10);
  background: #fff;
  overflow: hidden;
  margin: 22px 0;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.post-toc-mobile__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-bg-soft);
}
.post-toc-mobile__summary::-webkit-details-marker { display: none; }
.post-toc-mobile__summary:hover { color: var(--color-primary); }
.post-toc-mobile__summary svg:first-child { color: var(--color-primary); flex-shrink: 0; }
.post-toc-mobile__summary span { flex: 1; }
.post-toc-mobile__chevron { color: var(--color-text-muted); flex-shrink: 0; transition: transform .2s; }
details[open] .post-toc-mobile__summary { border-bottom: 1px solid var(--color-border); }
details[open] .post-toc-mobile__chevron { transform: rotate(180deg); }

.post-toc-mobile__list {
  list-style: none;
  margin: 0;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Specificity high: prevent .post-content a styles bleeding onto TOC links */
.post-content .post-toc-mobile__link,
.post-toc-mobile__link {
  display: block;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-6);
  transition: color var(--transition);
}
.post-content .post-toc-mobile__link:hover,
.post-toc-mobile__link:hover {
  background: transparent;
  color: var(--color-primary);
  text-decoration: none;
}
.post-content .post-toc-mobile__link--h3,
.post-toc-mobile__link--h3 {
  padding-left: calc(10px + 16px);
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
}


/* Related products (blog post) */
.post-products { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--color-border); }
.post-products__grid { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }

/* Geo hub ward links (orphan prevention for /khac-dau-{slug}) */
.ti-geohub { margin: var(--space-6) 0 0; padding: var(--space-6) var(--space-8); background: var(--color-bg-soft); border: 1px solid var(--color-border-soft); border-radius: var(--radius-12); }
.ti-geohub__title { font-size: var(--font-size-xl); margin: 0 0 var(--space-2); color: var(--color-text); }
.ti-geohub__lead { margin: 0 0 var(--space-5); font-size: var(--font-size-base); color: var(--color-text-muted); }
.ti-geohub__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.ti-geohub__link { display: block; padding: var(--space-4) var(--space-5); background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-8); color: var(--color-text); text-decoration: none; font-weight: 500; transition: border-color .15s ease, color .15s ease; }
.ti-geohub__link:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ti-geohub__note { font-weight: 400; font-size: var(--font-size-sm); color: var(--color-text-muted); }
