/* ==============================================
   SINGLE POST: Cover card + 3-col layout + rail + related
   ============================================== */

/* ── Article cover card ── */
.ghit-cover {
  position: relative;
  margin-top: 26px;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, #1E1B4B, #312E81 48%, #0F766E);
  box-shadow: 0 40px 90px -40px rgba(49,46,129,.8);
}
.ghit-cover__body {
  position: relative;
  padding: 40px 48px 42px;
  max-width: 840px;
}
.ghit-cover__title {
  font-size: 40px;
  line-height: 1.16;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.025em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.ghit-cover__desc {
  color: rgba(255,255,255,.8);
  font-size: 17px;
  line-height: 1.6;
  max-width: 660px;
  margin: 0 0 28px;
}
.ghit-cover__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* ── Breadcrumb (inside cover card) ── */
.ghit-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-bottom: 22px;
  font-family: var(--font-mono);
}
.ghit-breadcrumb a { color: rgba(255,255,255,.7); }
.ghit-breadcrumb a:hover { color: #fff; }
.ghit-breadcrumb .sep { opacity: .4; }
.ghit-breadcrumb .current { color: rgb(167,139,250); }

/* ── Meta stat items inside cover ── */
.ghit-art-hero__stat {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.78);
  font-size: 13.5px;
  font-family: var(--font-mono);
}

/* ── Category badge inside cover ── */
.ghit-feat__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 99px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.ghit-feat__badge:hover { background: rgba(255,255,255,.22); }

/* ── TOC (left column, sticky) ── */
.ghit-toc {
  position: sticky;
  top: calc(var(--topbar-h) + var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - var(--topbar-h) - var(--header-h) - 40px);
  max-height: calc(100dvh - var(--topbar-h) - var(--header-h) - 40px);
  overflow-y: auto;
  scrollbar-width: none;
}
.ghit-toc::-webkit-scrollbar { display: none; }
.ghit-toc__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: 14px;
}
#toc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--border);
}
#toc-nav a {
  position: relative;
  display: block;
  padding: 7px 14px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: -2px;
  border-left: 2px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
#toc-nav a:hover { color: var(--color-purple); border-left-color: rgba(91,33,182,.35); }
#toc-nav a.active { color: var(--color-purple); font-weight: 700; border-left-color: var(--color-purple); }
#toc-nav .toc-h3 { padding-left: 26px; font-size: 13px; }

/* Mobile TOC */
.ghit-tocm {
  display: none;
  margin-bottom: 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.ghit-tocm summary {
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-primary);
  user-select: none;
}
.ghit-tocm__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.ghit-tocm__list a { font-size: 14px; color: var(--text-secondary); }
.ghit-tocm__list a:hover { color: var(--color-purple); }

/* ── Prose content ── */
.ghit-prose {
  font-size: 17.5px;
  line-height: 1.86;
  color: #334155;
  text-align: justify;
  hyphens: auto;
}
.ghit-prose p { margin-bottom: 22px; }

.ghit-prose h2 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin: 46px 0 16px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.ghit-prose h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.ghit-prose h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 10px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.ghit-prose ul, .ghit-prose ol { padding-left: 24px; margin-bottom: 22px; }
.ghit-prose li { margin-bottom: 8px; line-height: 1.7; }
.ghit-prose a:not(.ghit-plain) { color: #5B21B6; font-weight: 600; border-bottom: 1px solid #C4B5FD; text-decoration: none; }
.ghit-prose a:not(.ghit-plain):hover { color: var(--color-blue); border-bottom-color: var(--color-blue); }
.ghit-prose blockquote {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px 14px;
  align-items: start;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 16px;
  padding: 18px 20px;
  margin: 28px 0;
  font-style: normal;
  color: #475569;
}
.ghit-prose blockquote::before {
  content: '⚠';
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid #FDE68A;
  background: #FFFBEB;
  color: #B45309;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  font-style: normal;
}
.ghit-prose blockquote > * {
  grid-column: 2;
  min-width: 0;
}
.ghit-prose blockquote p { margin: 0 0 8px; font-size: 15px; line-height: 1.65; }
.ghit-prose blockquote p:last-child { margin: 0; }
.ghit-prose blockquote strong { color: #92400E; }
.ghit-prose blockquote .ghit-codeblock-wrap,
.ghit-prose blockquote .ghit-codeblock { margin: 8px 0 0; }

.ghit-prose img { border-radius: 12px; margin: 16px 0; max-width: 100%; height: auto; }
.ghit-prose iframe { max-width: 100%; }
.ghit-prose .wp-embed-aspect-16-9 { position: relative; }
.ghit-prose .wp-embed-aspect-16-9 iframe { width: 100%; aspect-ratio: 16/9; height: auto; }
.ghit-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: 12px;
  border: 1px solid #1E1B33;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,.4) transparent;
}
.ghit-table-wrap::-webkit-scrollbar { height: 6px; }
.ghit-table-wrap::-webkit-scrollbar-track { background: transparent; }
.ghit-table-wrap::-webkit-scrollbar-thumb { background: rgba(139,92,246,.4); border-radius: 99px; }
.ghit-table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.7); }
.ghit-table-wrap.has-scroll { cursor: grab; }
.ghit-table-wrap.is-grabbing,
.ghit-table-wrap.is-grabbing * { cursor: grabbing !important; }
.ghit-table-wrap td,
.ghit-table-wrap th { cursor: text; }
.ghit-prose table { width: 100%; border-collapse: collapse; margin: 0; font-size: 14px; }
/* Header */
.ghit-prose thead { background: #161427; }
.ghit-prose th {
  padding: 12px 18px;
  font-weight: 600;
  font-size: 12.5px;
  color: #A78BFA;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid #2D2A45;
  text-align: left;
}
/* Body */
.ghit-prose td {
  padding: 11px 18px;
  color: var(--text);
  border-bottom: 1px solid #1A1730;
  vertical-align: top;
  line-height: 1.6;
}
.ghit-prose tbody tr:last-child td { border-bottom: none; }
.ghit-prose tbody tr:hover td { background: rgba(139,92,246,.05); }
.ghit-prose code:not(pre code) {
  font-family: var(--font-mono);
  font-size: .86em;
  background: #F1ECFB;
  color: #6D28D9;
  padding: 2px 7px;
  border: 1px solid #E9D5FF;
  border-radius: 5px;
}
/* ── highlight.js syntax highlight theme ── */
/* Base: dùng specificity cao + !important để thắng plugin code-syntax-block CSS */
.ghit-codeblock pre code,
.ghit-codeblock pre code.hljs {
  color: #A5F3FC !important;
  background: transparent !important;
}
/* Token colors — scoped vào .ghit-codeblock để tăng specificity */
.ghit-codeblock .hljs-comment,
.ghit-codeblock .hljs-quote              { color: #94A3B8; font-style: italic; }
.ghit-codeblock .hljs-keyword,
.ghit-codeblock .hljs-selector-tag,
.ghit-codeblock .hljs-name,
.ghit-codeblock .hljs-tag                { color: #C4B5FD; }
.ghit-codeblock .hljs-string,
.ghit-codeblock .hljs-template-tag,
.ghit-codeblock .hljs-template-variable,
.ghit-codeblock .hljs-addition           { color: #5EEAD4; }
.ghit-codeblock .hljs-built_in,
.ghit-codeblock .hljs-type               { color: #93C5FD; }
.ghit-codeblock .hljs-number,
.ghit-codeblock .hljs-literal,
.ghit-codeblock .hljs-regexp             { color: #FBBF24; }
/* hljs 11.x compound class — class names & function names */
.ghit-codeblock .hljs-title,
.ghit-codeblock .hljs-title.class_,
.ghit-codeblock .hljs-title.class_.inherited__,
.ghit-codeblock .hljs-section,
.ghit-codeblock .hljs-selector-id,
.ghit-codeblock .hljs-selector-class     { color: #93C5FD; }
.ghit-codeblock .hljs-title.function_    { color: #67E8F9; }
.ghit-codeblock .hljs-symbol,
.ghit-codeblock .hljs-bullet,
.ghit-codeblock .hljs-meta,
.ghit-codeblock .hljs-deletion           { color: #FCA5A5; }
.ghit-codeblock .hljs-variable,
.ghit-codeblock .hljs-attr               { color: #F472B6; }
.ghit-codeblock .hljs-params             { color: #E2E8F0; }
.ghit-codeblock .hljs-emphasis           { font-style: italic; }
.ghit-codeblock .hljs-strong             { font-weight: bold; }

/* ── Code block ── */
.ghit-prose pre,
.entry-content pre {
  margin: 28px 0;
  border-radius: 14px;
  overflow: hidden;
  background: #0E0B1A;
  border: 1px solid #1E1B33;
}
.ghit-codeblock {
  margin: 28px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1E1B33;
}
.ghit-codeblock__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: #161427;
  border-bottom: 1px solid #262338;
}
.ghit-codeblock__dots {
  display: flex;
  gap: 6px;
}
.ghit-codeblock__dot {
  width: 11px;
  height: 11px;
  border-radius: 99px;
}
.ghit-codeblock__lang {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #94A3B8;
  margin-left: 8px;
}
.ghit-codeblock__lang--terminal {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #A5F3FC;
}
.ghit-codeblock.is-terminal pre code {
  color: #A5F3FC !important;
}
.ghit-codeblock__copy {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid #312E48;
  background: #1C1930;
  color: #C4B5FD;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.ghit-codeblock__copy:hover { background: #262042; border-color: #4C1D95; }
.ghit-codeblock__copy.copied { color: #34D399; }

/* Sticky horizontal scrollbar */
.ghit-codeblock-wrap {
  position: relative;
  margin: 28px 0;
}
.ghit-codeblock-wrap .ghit-codeblock {
  margin: 0;
}
.ghit-hscroll {
  display: none;
  overflow-x: auto;
  overflow-y: hidden;
  height: 14px;
  background: #0E0B1A;
  border-radius: 0 0 14px 14px;
  border: 1px solid #1E1B33;
  border-top: none;
  position: sticky;
  bottom: 0;
  z-index: 3;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.55) rgba(255,255,255,0.05);
}
.ghit-hscroll::-webkit-scrollbar { height: 8px; }
.ghit-hscroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.ghit-hscroll::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.55); border-radius: 99px; }
.ghit-hscroll::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.85); }
.ghit-hscroll__inner { height: 1px; }

/* Line numbers */
.ghit-codeblock.has-line-numbers pre {
  display: flex !important;
}
.ghit-linenums {
  display: flex;
  flex-direction: column;
  padding: 20px 12px 20px 16px;
  border-right: 1px solid #1E1B33;
  user-select: none;
  flex-shrink: 0;
  text-align: right;
}
.ghit-linenums span {
  font-size: 13.5px;
  line-height: 1.75;
  color: #7C78A8;
  display: block;
  font-family: var(--font-mono);
}
.ghit-codeblock.has-line-numbers pre code {
  flex: 1;
}

.ghit-codeblock pre {
  margin: 0 !important;
  padding: 20px !important;
  background: #0E0B1A !important;
  border-radius: 0 !important;
  border: none !important;
  overflow-x: auto;
  /* Scrollbar slim, rõ ràng — đồng bộ tông tím của theme */
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,.6) transparent;
}
.ghit-codeblock pre::-webkit-scrollbar { height: 4px; }
.ghit-codeblock pre::-webkit-scrollbar-track { background: transparent; }
.ghit-codeblock pre::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,.6);
  border-radius: 99px;
}
.ghit-codeblock pre::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.85); }
.ghit-codeblock pre.has-scroll.is-grab-zone { cursor: grab; }
.ghit-codeblock pre.is-grabbing,
.ghit-codeblock pre.is-grabbing * { cursor: grabbing !important; }
.ghit-codeblock pre code,
.ghit-codeblock pre code.hljs,
.ghit-prose pre code,
.entry-content pre code {
  display: block;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: #A5F3FC;
  white-space: pre;
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
}
.ghit-prose pre:not(.ghit-codeblock pre),
.entry-content pre:not(.ghit-codeblock pre) {
  padding: 20px;
  overflow-x: auto;
}

/* Alias — WP generates .entry-content, keep compatible */
.entry-content { font-size: 17px; line-height: 1.78; color: var(--text-primary); }
.entry-content p { margin-bottom: 22px; }
.entry-content h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--text-primary); margin: 44px 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--border); scroll-margin-top: calc(var(--header-h) + 16px); }
.entry-content h3 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 32px 0 12px; scroll-margin-top: calc(var(--header-h) + 16px); }
.entry-content h4 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 24px 0 10px; scroll-margin-top: calc(var(--header-h) + 16px); }
.entry-content ul, .entry-content ol { padding-left: 24px; margin-bottom: 22px; }
.entry-content li { margin-bottom: 8px; line-height: 1.7; }
.entry-content a { color: var(--color-purple); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { color: var(--color-blue); }
.entry-content blockquote { border-left: 3px solid var(--color-purple); padding: 16px 22px; margin: 28px 0; background: rgba(91,33,182,.04); border-radius: 0 12px 12px 0; font-style: italic; color: var(--text-secondary); }
.entry-content img { border-radius: 12px; margin: 16px 0; max-width: 100%; height: auto; }
.entry-content code:not(pre code) { font-family: var(--font-mono); font-size: .875em; background: rgba(91,33,182,.08); color: var(--color-purple); padding: .15em .42em; border-radius: 5px; }

/* ── Tags ── */
.ghit-art-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

/* ── Author box ── */
.ghit-author-box {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 30px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 18px 40px -28px rgba(15,23,42,.35);
}
.ghit-author-box__avatar { flex-shrink: 0; }
.ghit-author-box__img { width: 62px; height: 62px; border-radius: 18px; display: block; }
.ghit-author-box__initials {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: linear-gradient(135deg, #5B21B6, #2563EB);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.ghit-author-box__info { flex: 1; min-width: 0; }
.ghit-author-box__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-teal);
  display: block;
}
.ghit-author-box__name { font-size: 18px; font-weight: 800; margin: 3px 0 5px; color: var(--text-primary); }
.ghit-author-box__bio { font-size: 14px; color: var(--text-secondary); line-height: 1.55; margin: 0; }
.ghit-author-box__follow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5B21B6, #2563EB);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 22px -8px rgba(91,33,182,.6);
  transition: opacity var(--t-fast);
}
.ghit-author-box__follow:hover { opacity: .88; }

/* ── Inline share (tablet + mobile, hidden on desktop) ── */
.ghit-art-share {
  margin-top: 28px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
}
.ghit-art-share__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 14px;
}
.ghit-art-share__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ghit-art-share__btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.ghit-art-share__btn--fb    { color: #1877F2; }
.ghit-art-share__btn--fb:hover  { background: #1877F2; border-color: #1877F2; color: #fff; }
.ghit-art-share__btn--x     { color: var(--text-primary); }
.ghit-art-share__btn--x:hover   { background: #0F172A; border-color: #0F172A; color: #fff; }
.ghit-art-share__btn--copy  { color: var(--color-teal); }
.ghit-art-share__btn--copy:hover { background: var(--color-teal); border-color: var(--color-teal); color: #fff; }
.ghit-art-share__btn--zalo  { color: #0068FF; }
.ghit-art-share__btn--zalo:hover { background: #0068FF; border-color: #0068FF; color: #fff; }
.ghit-art-share__btn--li    { color: #0A66C2; }
.ghit-art-share__btn--li:hover   { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.ghit-art-share__btn svg { flex-shrink: 0; }
.ghit-art-share__btn:focus-visible {
  outline: 2px solid var(--color-primary, #6366f1);
  outline-offset: 2px;
}

/* ── Prev / Next navigation ── */
.ghit-pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}
.ghit-pn__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.ghit-pn__item:hover { border-color: #C4B5FD; box-shadow: 0 18px 38px -24px rgba(91,33,182,.4); }
.ghit-pn__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.ghit-pn__item--next .ghit-pn__label { justify-content: flex-end; }
.ghit-pn__item--next { text-align: right; }
.ghit-pn__title {
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--text-primary);
}

/* ── Right rail sidebar ── */
.ghit-rail {
  position: sticky;
  top: calc(var(--topbar-h) + var(--header-h) + 20px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Series navigator panel */
.ghit-rail-series {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.ghit-rail-series__head {
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, #1E1B4B, #312E81);
  position: relative;
  overflow: hidden;
}
.ghit-rail-series__dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: .5;
}
.ghit-rail-series__label {
  position: relative;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #A78BFA;
  display: block;
}
.ghit-rail-series__name {
  position: relative;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin: 5px 0 12px;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.ghit-rail-series__bar-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ghit-rail-series__bar-track {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,.18);
  overflow: hidden;
}
.ghit-rail-series__bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #A78BFA, #5EEAD4);
}
.ghit-rail-series__pos {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,.8);
  flex-shrink: 0;
}
.ghit-rail-series__list {
  padding: 4px 4px 16px;
  /* sticky-top + series head (~110px) + bottom gap (20px), buffer thêm để thấy border/bo góc đáy */
  max-height: calc(100vh - var(--topbar-h) - var(--header-h) - 20px - 110px - 24px);
  max-height: calc(100dvh - var(--topbar-h) - var(--header-h) - 20px - 110px - 24px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #E2E8F0 transparent;
}
.ghit-rail-series__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 11px;
  border-radius: 11px;
  text-decoration: none;
  transition: background var(--t-fast);
}
.ghit-rail-series__item:hover { background: #F1F5F9; }
.ghit-rail-series__item.is-current { background: #F1F5F9; }
.ghit-rail-series__num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #F1F5F9;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.ghit-rail-series__num.is-current {
  background: linear-gradient(135deg, #5B21B6, #2563EB);
  color: #fff;
}
.ghit-rail-series__title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.32;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ghit-rail-series__item.is-current .ghit-rail-series__title {
  font-weight: 700;
  color: var(--text-primary);
}

/* Chapter accordion */
.ghit-rail-chapter { border-radius: 11px; overflow: hidden; }
.ghit-rail-chapter + .ghit-rail-chapter { margin-top: 2px; }
.ghit-rail-chapter__head {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 8px 10px 8px 12px;
  background: #EEF2FF;
  border: none;
  border-left: 3px solid #818CF8;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-fast);
}
.ghit-rail-chapter__head:hover { background: #E0E7FF; }
.ghit-rail-chapter.is-open .ghit-rail-chapter__head { background: #E0E7FF; }
.ghit-rail-chapter__chevron {
  flex-shrink: 0;
  color: #818CF8;
  transition: transform .2s ease;
}
.ghit-rail-chapter.is-open .ghit-rail-chapter__chevron { transform: rotate(180deg); }
.ghit-rail-chapter__name {
  flex: 1;
  font-size: 12.5px;
  font-weight: 800;
  color: #3730A3;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.ghit-rail-chapter__count {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #6366F1;
  background: #C7D2FE;
  border-radius: 6px;
  padding: 1px 6px;
}
.ghit-rail-chapter__posts {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .22s ease;
  padding-left: 4px;
}
.ghit-rail-chapter.is-open .ghit-rail-chapter__posts { grid-template-rows: 1fr; }
.ghit-rail-chapter__posts > * { overflow: hidden; }

/* Share panel */
.ghit-rail-share {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
}
.ghit-rail-share__title {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 13px;
  color: var(--text-primary);
}
.ghit-rail-share__btns { display: flex; gap: 9px; }
.ghit-rail-share__btn {
  flex: 1;
  height: 44px;
  border-radius: 11px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.ghit-rail-share__btn--fb { color: #1877F2; }
.ghit-rail-share__btn--fb:hover { background: #1877F2; border-color: #1877F2; color: #fff; }
.ghit-rail-share__btn--x { color: var(--text-primary); }
.ghit-rail-share__btn--x:hover { background: var(--text-primary); border-color: var(--text-primary); color: #fff; }
.ghit-rail-share__btn--copy { color: var(--color-teal); }
.ghit-rail-share__btn--copy:hover { background: var(--color-teal); border-color: var(--color-teal); color: #fff; }
.ghit-rail-share__btn:focus-visible {
  outline: 2px solid var(--color-primary, #6366f1);
  outline-offset: 2px;
}

/* "Gợi ý tiếp theo" CTA panel */
.ghit-rail-next {
  background: linear-gradient(150deg, #0F766E, #2563EB);
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.ghit-rail-next__dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: .5;
}
.ghit-rail-next__inner { position: relative; }
.ghit-rail-next__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #A7F3D0;
  display: block;
}
.ghit-rail-next__title {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin: 7px 0 12px;
  line-height: 1.35;
}
.ghit-rail-next__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  background: #fff;
  color: #0F766E;
  font-weight: 700;
  font-size: 13.5px;
  transition: opacity var(--t-fast);
}
.ghit-rail-next__btn:hover { opacity: .9; }

/* ── Star rating ── */
.ghit-star-rating {
  display: flex;
  justify-content: center;
  padding: 32px 0 20px;
  border-top: 1px solid #F1F5F9;
  margin-top: 48px;
}
.ghit-star-rating .kksr-widget { margin: 0 auto; }

/* ── Related posts section ── */
.ghit-related-section { margin-top: 60px; }
.ghit-related-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.ghit-related-head__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-teal);
  white-space: nowrap;
}
.ghit-related-head__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.ghit-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.ghit-related-grid .ghit-pcard__title a.ghit-ttl { color: #0F172A; }
.ghit-related-grid .ghit-pcard__title a.ghit-ttl:hover { color: var(--color-purple) !important; }

/* ── Floating share bar (left, desktop only) ── */
.ghit-share {
  position: fixed;
  left: max(2px, calc(50vw - 675px));
  /* Neo cố định ngay dưới main nav (sticky) thay vì căn giữa theo % viewport —
     căn giữa khiến nút đầu tiên có thể chui xuống dưới header khi màn hình thấp */
  top: calc(var(--topbar-h) + var(--header-h) + 48px);
  z-index: var(--z-share, 40);
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.ghit-share.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.ghit-share__btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -10px rgba(15,23,42,.3);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.ghit-share__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(15,23,42,.4);
}
.ghit-share__btn:focus-visible {
  outline: 2px solid var(--color-primary, #6366f1);
  outline-offset: 2px;
}
.ghit-share__btn--fb     { color: #1877F2; }
.ghit-share__btn--fb:hover { background: #1877F2; border-color: #1877F2; color: #fff; box-shadow: 0 12px 26px -10px rgba(24,119,242,.5); }
.ghit-share__btn--x      { color: var(--text-primary); }
.ghit-share__btn--x:hover { background: #0F172A; border-color: #0F172A; color: #fff; }
.ghit-share__btn--zalo  { color: #0068FF; }
.ghit-share__btn--zalo:hover { background: #0068FF; border-color: #0068FF; color: #fff; box-shadow: 0 12px 26px -10px rgba(0,104,255,.45); }
.ghit-share__btn--li    { color: #0A66C2; }
.ghit-share__btn--li:hover { background: #0A66C2; border-color: #0A66C2; color: #fff; box-shadow: 0 12px 26px -10px rgba(10,102,194,.45); }
.ghit-share__btn--copy   { color: var(--color-teal); }
.ghit-share__btn--copy:hover { background: var(--color-teal); border-color: var(--color-teal); color: #fff; box-shadow: 0 12px 26px -10px rgba(15,118,110,.5); }

/* ── Responsive ── */
/* ── Toast thông báo ── */
#ghit-toast {
  position: fixed;
  bottom: calc(32px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #0F172A;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 16px 10px 12px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(15,23,42,.3);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: var(--z-toast, 9999);
  display: flex;
  align-items: center;
  gap: 9px;
  border-left: 3px solid #34D399;
}
#ghit-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#ghit-toast .ghit-toast__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 99px;
  background: #34D399;
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ghit-toast .ghit-toast__icon svg { display: block; }

/* ── Custom Share Modal ── */
.ghit-share-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 9500);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}
.ghit-share-modal.is-open { pointer-events: auto; }

.ghit-share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .22s ease;
}
.ghit-share-modal.is-open .ghit-share-modal__backdrop { opacity: 1; }

.ghit-share-modal__card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 22px;
  box-shadow: 0 24px 64px rgba(15,23,42,.22);
  transform: scale(.94) translateY(12px);
  opacity: 0;
  transition: transform .26s cubic-bezier(.32,.72,0,1), opacity .22s ease;
}
.ghit-share-modal.is-open .ghit-share-modal__card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.ghit-share-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.ghit-share-modal__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.ghit-share-modal__close {
  width: 44px;
  height: 44px;
  border-radius: 99px;
  border: none;
  background: #F1F5F9;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}
.ghit-share-modal__close:hover { background: #E2E8F0; }

.ghit-share-modal__url-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px 10px 14px;
  margin-bottom: 20px;
}
.ghit-share-modal__url-icon { flex-shrink: 0; color: var(--text-muted); margin-top: 3px; }
.ghit-share-modal__url-text {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  word-break: break-all;
  max-height: 4.5em; /* ~3 dòng, dài hơn thì scroll */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}
.ghit-share-modal__copy-btn { margin-top: 1px; }
.ghit-share-modal__copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #5B21B6, #2563EB);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px -3px rgba(91,33,182,.5);
  transition: box-shadow var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.ghit-share-modal__copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -3px rgba(91,33,182,.6);
}
.ghit-share-modal__copy-btn:active { transform: translateY(0); }
.ghit-share-modal__copy-btn.is-copied {
  background: linear-gradient(135deg, #059669, #10B981);
  box-shadow: 0 4px 12px -3px rgba(5,150,105,.5);
}
.ghit-share-modal__copy-btn span { display: none; }
.ghit-share-modal__copy-icon { display: block; }

.ghit-share-modal__socials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ghit-share-modal__soc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #fff;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  color: var(--text-secondary);
}
.ghit-share-modal__soc:hover { transform: translateY(-2px); }
.ghit-share-modal__soc--fb  { color: #1877F2; }
.ghit-share-modal__soc--fb:hover  { background: #EFF6FF; border-color: #93C5FD; }
.ghit-share-modal__soc--x   { color: #0F172A; }
.ghit-share-modal__soc--x:hover   { background: #F8FAFC; border-color: #CBD5E1; }
.ghit-share-modal__soc--li  { color: #0A66C2; }
.ghit-share-modal__soc--li:hover  { background: #EFF6FF; border-color: #93C5FD; }
.ghit-share-modal__soc--zalo { color: #0068FF; }
.ghit-share-modal__soc--zalo:hover { background: #EFF6FF; border-color: #93C5FD; }

/* ── Mobile Series FAB + Bottom Sheet ── */
.ghit-series-fab {
  display: none; /* ẩn trên desktop */
}
@media (max-width: 1180px) {
  .ghit-series-fab {
    display: flex;
    align-items: center;
    gap: 7px;
    position: fixed;
    bottom: calc(70px + env(safe-area-inset-bottom));
    right: calc(20px + env(safe-area-inset-right));
    z-index: var(--z-fab, 1200);
    background: linear-gradient(135deg, #1E1B4B, #312E81);
    color: #fff;
    border: none;
    border-radius: 99px;
    padding: 10px 16px 10px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(30,27,75,.45);
    transition: transform .15s ease, box-shadow .15s ease;
  }
  .ghit-series-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(30,27,75,.55); }
  .ghit-series-fab__pos {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #A78BFA;
  }
}

/* Sheet overlay */
.ghit-series-sheet {
  display: none;
}
@media (max-width: 1180px) {
  .ghit-series-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: var(--z-sheet, 1300);
    pointer-events: none;
  }
  .ghit-series-sheet.is-open { pointer-events: auto; }

  .ghit-series-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.55);
    opacity: 0;
    transition: opacity .28s ease;
  }
  .ghit-series-sheet.is-open .ghit-series-sheet__backdrop { opacity: 1; }

  .ghit-series-sheet__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32,.72,0,1);
    overflow: hidden;
  }
  .ghit-series-sheet.is-open .ghit-series-sheet__panel { transform: translateY(0); }

  .ghit-series-sheet__handle {
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: #CBD5E1;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  .ghit-series-sheet__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px 14px;
    background: linear-gradient(135deg, #1E1B4B, #312E81);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
  }
  .ghit-series-sheet__head::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: .5;
  }
  .ghit-series-sheet__head-info { flex: 1; position: relative; }
  .ghit-series-sheet__head .ghit-rail-series__label,
  .ghit-series-sheet__head .ghit-rail-series__name,
  .ghit-series-sheet__head .ghit-rail-series__bar-row { position: relative; }
  .ghit-series-sheet__head .ghit-rail-series__name { margin: 4px 0 10px; font-size: 15px; }

  .ghit-series-sheet__close {
    flex-shrink: 0;
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 99px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -6px;
    margin-right: -8px;
    transition: background .15s ease;
  }
  .ghit-series-sheet__close:hover { background: rgba(255,255,255,.25); }

  .ghit-series-sheet__list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 8px 24px;
    max-height: none !important; /* override desktop constraint */
    scrollbar-width: thin;
    scrollbar-color: #E2E8F0 transparent;
  }
}

/* Floating share bar: chỉ desktop (ẩn dưới 1100px, dùng inline share thay thế).
   Dưới ~1300px thanh share nằm sát mép trái (left clamp 2px) và có thể chạm nhẹ
   vào cột TOC — chấp nhận được, ưu tiên hiển thị trên laptop 1280/1366px phổ biến. */
@media (max-width: 1099px) {
  .ghit-share { display: none !important; }
}
/* Inline share: chỉ tablet + mobile */
.ghit-art-share { display: none; }
@media (max-width: 1099px) {
  .ghit-art-share { display: block; }
}
@media (max-width: 1100px) {
  .ghit-cover__title { font-size: 30px; }
  .ghit-rail { position: static; }
}
@media (max-width: 1180px) {
  /* Rail xuống hàng riêng (xem layout.css) — ẩn có chọn lọc: series navigator
     đã có FAB + bottom sheet mobile riêng, app-promo sidebar tránh trùng với
     bản cuối bài viết. "Gợi ý tiếp theo" (.ghit-rail-next) cũng ẩn bản này —
     có bản thay thế .ghit-next-mobile trong content-single.php, đặt trước
     app-promo cuối bài (đúng yêu cầu thứ tự hiển thị trên mobile). */
  .ghit-rail-series,
  .ghit-rail-allseries,
  .ghit-rail .ghit-app-promo,
  .ghit-rail .ghit-rail-next {
    display: none;
  }
}
/* Bản "Gợi ý tiếp theo" cho mobile (trong content-single.php) — ẩn desktop,
   chỉ hiện đúng breakpoint rail chuyển xuống hàng riêng. */
.ghit-next-mobile { display: none; margin-top: 32px; }
@media (max-width: 1180px) {
  .ghit-next-mobile { display: block; }
}
@media (max-width: 860px) {
  .ghit-cover { margin-top: 16px; }
  .ghit-cover__body { padding: 28px 28px 32px; }
  .ghit-cover__title { font-size: 24px; }
  .ghit-tocm { display: block; }
  .ghit-pn { grid-template-columns: 1fr; }
  .ghit-author-box { flex-direction: column; align-items: flex-start; }
  .ghit-author-box__follow { align-self: flex-start; }
  .ghit-related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .ghit-prose { text-align: left; }
}
@media (max-width: 600px) {
  .ghit-cover__body { padding: 22px 20px 26px; }
  .ghit-cover__title { font-size: 20px; }
  .ghit-prose { font-size: 16px; }
  .ghit-related-grid { grid-template-columns: 1fr; }
  .ghit-codeblock__copy { height: 38px; }
}

/* ══════════════════════════════════════════════
   COMMENTS SECTION
   ══════════════════════════════════════════════ */

.ghit-comments {
  margin-top: 28px;
}

/* ── Header ── */
.ghit-comments__head {
  margin-bottom: 32px;
}
.ghit-comments__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}
.ghit-comments__title svg { color: #7C3AED; flex-shrink: 0; }
.ghit-comments__title span { color: #7C3AED; }

/* ── Comment list ── */
.ghit-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Single comment ── */
.ghit-comment {
  padding: 24px 0;
  border-bottom: 1px solid #F1F5F9;
}
.ghit-comment:last-child { border-bottom: none; }

.ghit-comment--nested {
  padding-left: 52px;
}

.ghit-comment__inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ghit-comment__avatar { flex-shrink: 0; }
.ghit-comment__img {
  width: 44px;
  height: 44px;
  border-radius: 99px;
  object-fit: cover;
  border: 2px solid #EDE9FE;
}
.ghit-initials-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
}

.ghit-comment__body { flex: 1; min-width: 0; }

.ghit-comment__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ghit-comment__author {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
}
.ghit-comment__time {
  font-size: 12.5px;
  color: #94A3B8;
}
.ghit-comment__pending {
  font-size: 11.5px;
  color: #B45309;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 1px 7px;
}

.ghit-comment__text {
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
}
.ghit-comment__text p { margin: 0 0 8px; }
.ghit-comment__text p:last-child { margin: 0; }

.ghit-comment__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.ghit-comment__actions a,
.comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: #94A3B8;
  text-decoration: none;
  transition: color .15s;
}
.ghit-comment__actions a:hover,
.comment-reply-link:hover { color: #7C3AED; }

.ghit-comment__edit a {
  font-size: 12.5px;
  font-weight: 500;
  color: #CBD5E1;
  text-decoration: none;
  transition: color .15s;
}
.ghit-comment__edit a:hover { color: #7C3AED; }

.ghit-comment__ping {
  font-size: 13.5px;
  color: #94A3B8;
}

/* Threaded nested replies */
.ghit-comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── Pagination ── */
.ghit-comments__nav {
  display: flex;
  gap: 8px;
  padding: 24px 0 0;
}
.ghit-comments__nav .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #64748B;
  text-decoration: none;
  border: 1px solid #E2E8F0;
  transition: all .15s;
}
.ghit-comments__nav .page-numbers:hover,
.ghit-comments__nav .page-numbers.current {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #fff;
}

.ghit-comments__closed {
  font-size: 14px;
  color: #94A3B8;
  padding: 16px;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  margin: 0;
}

/* ══════════════════════════════════════════════
   COMMENT FORM
   ══════════════════════════════════════════════ */

.ghit-comment-form {
  margin-top: 20px;
  border-top: 1px solid #F1F5F9;
}

/* Honeypot chống spam — ẩn hoàn toàn với người dùng thật, bot auto-fill sẽ tự điền */
.ghit-comment-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ghit-form__title {
  font-size: 18px;
  font-weight: 700;
  color: #1E293B;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Cancel reply link */
#cancel-comment-reply-link {
  font-size: 12.5px;
  font-weight: 500;
  color: #94A3B8;
  text-decoration: none;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 2px 10px;
  transition: all .15s;
  display: inline-block;
  margin-left: 6px;
}
#cancel-comment-reply-link:hover {
  color: #7C3AED;
  border-color: #C4B5FD;
  background: #FAF5FF;
}

.ghit-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.ghit-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ghit-form__field--textarea { margin-bottom: 16px; }

.ghit-form__label {
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
}
.ghit-form__req { color: #7C3AED; }

.ghit-form__input,
.ghit-form__textarea {
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #1E293B;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  box-sizing: border-box;
}
.ghit-form__input::placeholder,
.ghit-form__textarea::placeholder { color: #CBD5E1; }
.ghit-form__input:focus,
.ghit-form__textarea:focus {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.ghit-form__textarea { resize: vertical; min-height: 120px; line-height: 1.65; }

.ghit-form__cookie-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748B;
  cursor: pointer;
  margin-bottom: 20px;
}
.ghit-form__cookie-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #7C3AED;
  flex-shrink: 0;
}

.ghit-form__submit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Submit button */
.ghit-btn--primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity .18s, transform .18s, box-shadow .18s;
  box-shadow: 0 4px 14px -4px rgba(109,40,217,.5);
}
.ghit-btn--primary:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -4px rgba(109,40,217,.55);
}
.ghit-btn--primary:active { transform: translateY(0); }

/* ── Logged-in note ── */
.logged-in-as {
  font-size: 13px;
  color: #94A3B8;
  margin: 0 0 20px;
}
.logged-in-as a { color: #7C3AED; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .ghit-comment--nested { padding-left: 28px; }
  .ghit-form__row { grid-template-columns: 1fr; }
}

/* ── All-series list (rail, khi bài không thuộc series nào) ── */
.ghit-rail-allseries {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}
.ghit-rail-allseries__head {
  position: relative;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.ghit-rail-allseries__dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(124,58,237,.12) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
  border-radius: 14px 14px 0 0;
}
.ghit-rail-allseries__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7C3AED;
  margin-bottom: 4px;
  position: relative;
}
.ghit-rail-allseries__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  position: relative;
}
.ghit-rail-allseries__list {
  list-style: none;
  margin: 0;
  padding: 6px 0 16px;
  /* sticky-top + allseries head (~70px) + bottom gap (20px), buffer thêm để thấy border/bo góc đáy */
  max-height: calc(100vh - var(--topbar-h) - var(--header-h) - 20px - 70px - 24px);
  max-height: calc(100dvh - var(--topbar-h) - var(--header-h) - 20px - 70px - 24px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #E2E8F0 transparent;
}
.ghit-rail-allseries__item {
  border-bottom: 1px solid var(--border);
}
.ghit-rail-allseries__item:last-child { border-bottom: none; }
.ghit-rail-allseries__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}
.ghit-rail-allseries__link:hover { background: var(--surface-alt, rgba(124,58,237,.04)); }
.ghit-rail-allseries__img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.ghit-rail-allseries__icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .02em;
  box-shadow: 0 4px 10px -4px rgba(15,23,42,.35);
}
.ghit-rail-allseries__info {
  flex: 1;
  min-width: 0;
}
.ghit-rail-allseries__name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.ghit-rail-allseries__meta {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.ghit-rail-allseries__arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: .5;
  transition: opacity .15s, transform .15s;
}
.ghit-rail-allseries__link:hover .ghit-rail-allseries__arrow {
  opacity: 1;
  transform: translateX(2px);
}
