  /* ===== Scoped article styles (won’t leak) ===== */
  :root{
  /* Mailoodeer brand */
  --mailoodeer-blue: #2D3265; /* rgb(45,50,101) */
  --mailoodeer-blue-ink: #ffffff;

  /* Resources layout baseline */
  --res-container: 1120px;
  --res-container-wide: 1240px;
  --res-pad: 24px;
  --res-pad-sm: 16px;

  /* Navbar / TOC sticky offset (dynamic via JS, fallback here) */
  --navbar-h: 72px;
  --toc-gap: 16px;
  --toc-sticky-top: calc(var(--navbar-h) + var(--toc-gap));
}

  .res-article{
    padding-top: calc(var(--navbar-h, 72px) + 16px);
    padding-bottom: 48px;
    overflow: visible !important;      /* ✅ allow sticky to work */
  overflow-x: visible !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* overall page container */
  .res-article .wrap{
  max-width: var(--res-container);
  margin-inline: auto;
  padding-inline: var(--res-pad);
}
@media (max-width: 576px){
  .res-article .wrap{ padding-inline: var(--res-pad-sm); }
}

  /* readable column (wider than before, closer to ) */
  .res-article .body{
  max-width: var(--res-container);
    margin: 0 auto;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
    font-size: 18px;
    line-height: 1.78;
    letter-spacing: -0.005em;
  }

  .res-article .kicker{
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(0,0,0,.55);
    font-weight: 700;
  }

  /* page title (serif like ) */
  .res-article h1{
    font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
    letter-spacing: -0.02em;
    line-height: 1.10;
    font-weight: 800;
    text-align: center;
    font-size: clamp(34px, 3.8vw, 52px);
    margin: 10px auto 14px;
    max-width: 26ch;
    text-wrap: normal; /* avoid weird line breaks */
  }

  .res-article .excerpt{
    max-width: 920px;
    margin: 0 auto 18px;
    text-align: center;
    font-weight: 500;
    color: rgba(0,0,0,.72);
    line-height: 1.65;
  }

  .res-article .meta{
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: .9rem;
    color: rgba(0,0,0,.55);
    margin-bottom: 18px;
  }

  .res-article figure{
    margin: 22px auto 28px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 .25rem 1rem rgba(15,15,15,.08);
    max-width: var(--res-container-wide);
    background: rgba(0,0,0,.03);
  }
  .res-article figure img{ width: 100%; height: auto; display: block; }

  /* Typography rhythm */
  .res-article .body p,
  .res-article .body ul,
  .res-article .body ol{
    color: rgba(0,0,0,.78);
    line-height: 1.78;
    margin-bottom: 1.25rem;
  }

  .res-article .body .lead{
    font-weight: 500;
    color: rgba(0,0,0,.76);
    margin-bottom: 1.25rem;
  }

  /* section headings (serif, avoid odd wrapping) */
  .res-article .body h2,
  .res-article .body h1{
    scroll-margin-top: var(--toc-sticky-top);
    margin-top: 3.2rem;
    margin-bottom: 1.1rem;
    font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.08;
    font-size: clamp(28px, 2.8vw, 40px);
    text-wrap: normal; /* fixes the weird line breaks */
    max-width: 44ch;
  }

  /* inner-content h1 should behave like a section heading */
  .res-article .body h1{
    text-align: left;
  }

  .res-article .body h3{
    margin-top: 2.0rem;
    margin-bottom: .85rem;
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.25;
  }

  .res-article .body ul,
  .res-article .body ol{
    padding-left: 1.25rem;
    margin: .75rem 0 1.25rem;
  }
  .res-article .body li{ margin: .5rem 0; }

  .res-article .section-divider{
    border: 0;
    border-top: 1px solid rgba(0,0,0,.08);
    margin: 2.4rem 0;
  }

  /* Optional: drop-cap ONLY for first paragraph */
  .res-article .body > p:first-of-type::first-letter{
    font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
    font-size: 3.1rem;
    font-weight: 700;
    line-height: 1;
    float: left;
    padding-right: 8px;
    margin-top: 6px;
  }

  /* Prevent inner content from using H1/H2 scale like page title */
    /* Optional: make h2 a bit calmer if it still feels huge */
  /* ===== Content blocks (marker-rendered components) ===== */
  .res-article .res-block{ margin: 1.4rem 0; }

  .res-article .res-callout{
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(0,0,0,.02);
  }
  .res-article .res-callout__title{ font-weight: 800; margin-bottom: 6px; }
  .res-article .res-callout--success{ background: rgba(25,135,84,.08); border-color: rgba(25,135,84,.18); }
  .res-article .res-callout--warning{ background: rgba(255,193,7,.10); border-color: rgba(255,193,7,.25); }
  .res-article .res-callout--danger{  background: rgba(220,53,69,.08); border-color: rgba(220,53,69,.20); }

  .res-article .res-two-col{
    display: grid;
    gap: 16px;
    align-items: start;
  }
  .res-article .res-two-col--50-50{ grid-template-columns: 1fr 1fr; }
  .res-article .res-two-col--60-40{ grid-template-columns: 3fr 2fr; }
  .res-article .res-two-col--40-60{ grid-template-columns: 2fr 3fr; }
  @media (max-width: 768px){
    .res-article .res-two-col{ grid-template-columns: 1fr; }
    .res-article .res-two-col--reverse-mobile .res-two-col__col:first-child{ order: 2; }
  }

  .res-article .res-steps__title{ font-weight: 800; margin: 0 0 10px; }
  .res-article .res-steps__list{ padding-left: 1.2rem; margin: 0; }
  .res-article .res-steps__item-title{ font-weight: 800; margin-bottom: 4px; }

  .res-article .res-quote{
    border-left: 4px solid rgba(0,0,0,.12);
    padding-left: 14px;
  }
  .res-article .res-quote__text{ margin: 0; font-weight: 600; }
  .res-article .res-quote__cap{ margin-top: 8px; color: rgba(0,0,0,.60); font-size: .95rem; }
  .res-article .res-quote__role{ margin-left: 8px; }



  /* =========================
   CTA CENTER (Mailchimp-like)
   ========================= */

/* CTA full-bleed background */
.res-article .res-cta-center{
  /* giữ style cũ */
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.10);
  margin: 2.5rem 0;

  /* FULL WIDTH kiểu “bleed” ra khỏi container */
  width: 100vw;
  position: relative;
left: 50%;
transform: translateX(-50%);

}

/* nếu muốn nền chạm sát mép màn hình luôn thì bỏ radius */
.res-article .res-cta-center--fullbleed{
  border-radius: 0;
}

.res-article .res-cta-center__inner{
  padding: 54px 18px;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

/* HEADLINE – KHÔNG dùng font serif */
.res-article .res-cta-center__title{
  margin: 0 auto 22px;
  max-width: 28ch;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: clamp(28px, 3.2vw, 52px);
}

/* ===== THEME ===== */

/* BLUE – mặc định nên dùng */
.res-article .res-cta-center--blue{
  background: var(--mailoodeer-blue);
  border-color: rgba(255,255,255,.16);
}
.res-article .res-cta-center--blue .res-cta-center__title{
  color: var(--mailoodeer-blue-ink);
}

/* YELLOW – chỉ dùng khi thật cần */
.res-article .res-cta-center--yellow{
  background: #ffe01b;
}

/* LIGHT */
.res-article .res-cta-center--light{
  background: rgba(0,0,0,.02);
}

/* DARK */
.res-article .res-cta-center--dark{
  background: #111827;
  border-color: rgba(255,255,255,.12);
}
.res-article .res-cta-center--dark .res-cta-center__title{
  color: rgba(255,255,255,.95);
}

/* ===== BUTTON ===== */
.res-article .res-cta-center__btn{
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Button trên nền blue */
.res-article .res-cta-center--blue .res-cta-center__btn{
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.85);
}
.res-article .res-cta-center--blue .res-cta-center__btn:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.95);
}

/* Mobile */
@media (max-width: 576px){
  .res-article .res-cta-center__inner{ padding: 38px 14px; }
  .res-article .res-cta-center__title{ max-width: 100%; }
}

  /* Mobile */
  @media (max-width: 576px){
      .res-article .res-cta-center__inner{ padding: 38px 14px; }
      .res-article .res-cta-center__title{ max-width: 100%; }
      .res-article .res-cta-center__btn{ width: auto; }
    }
  .res-article .res-media{ margin: 1.2rem 0; }
  .res-article .res-media__img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
}
  .res-article .res-media__cap{ margin-top: 8px; color: rgba(0,0,0,.60); font-size: .92rem; }
  .res-article .res-media__video{
    position: relative; width: 100%;
    border-radius: 14px; overflow:hidden;
    box-shadow: 0 .25rem 1rem rgba(15,15,15,.08);
    background: #000;
  }
  .res-article .res-media__video--16-9{ padding-top: 56.25%; }
  .res-article .res-media__video--4-3{ padding-top: 75%; }
  .res-article .res-media__video--1-1{ padding-top: 100%; }
  .res-article .res-media__video iframe{
    position:absolute; inset:0; width:100%; height:100%;
  }


/* ===========================
   Hero (Mailchimp-like)
   =========================== */

/* how much STACK image hangs into the next section */
:root{
  --hero-stack-hang: 46px;
}

.res-hero{
  padding-top: calc(var(--navbar-h, 72px) + 22px);
  padding-bottom: 22px;
  position: relative;
}

.res-hero__wrap{
  max-width: var(--res-container);
  margin-inline: auto;
  padding-inline: var(--res-pad);
}
@media (max-width: 576px){
  .res-hero__wrap{ padding-inline: var(--res-pad-sm); }
}

/* Full-bleed background (no border / no radius) */
.res-hero--bleed::before{
  content:"";
  position:absolute;
  inset: 0;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  z-index: 0;
}
.res-hero--bleed .res-hero__wrap{
  position: relative;
  z-index: 1;
}

/* Theme: light blue */
.res-hero--sky::before{ background: #eaf4ff; }
.res-hero--sky{ background: transparent; }

/* Simple layout: headline + desc only */
.res-hero--simple .res-hero__simple{
  padding: 54px 0 48px;
}

/* ✅ STACK layout: Mailchimp-ish (text on top, big image below that hangs out) */
.res-hero--stack{
  /* reserve space so the next section doesn't collide with the hanging image */
  padding-bottom: calc(22px + var(--hero-stack-hang));
}
.res-hero--stack .res-hero__stack{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 34px 0 0;
}
.res-hero--stack .res-hero__stackText{
  max-width: 62ch;
}
.res-hero--stack .res-hero__stackMedia{
  width: 100%;
  margin-top: 10px;
  margin-bottom: calc(-1 * var(--hero-stack-hang));
}
.res-hero--stack .res-hero__stackMedia img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;

  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .14);
  border: 1px solid rgba(0,0,0,.10);

  /* Mailchimp-ish poster ratio */
  aspect-ratio: 16 / 9;
  max-height: 520px;
}

/* Shared text styling */
.res-hero__kicker{
  font-size: .78rem;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(0,0,0,.55);
  margin-bottom: 12px;
}

.res-hero__title{
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.06;
  font-size: clamp(34px, 4vw, 58px);
  margin: 0 0 14px;
  color: rgba(0,0,0,.92);
}

.res-hero__desc{
  margin: 0;
  max-width: 58ch;
  font-size: 1.06rem;
  line-height: 1.7;
  color: rgba(0,0,0,.72);
}

/* Split grid */
.res-hero__grid{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 0;
  align-items: stretch;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  background: #fff;
}

/* optional per-theme override */
.res-hero--paper .res-hero__grid{ background: #fbfbf8; }
.res-hero--dark .res-hero__grid{ background: #0f172a; border-color: rgba(255,255,255,.12); }
.res-hero--brand .res-hero__grid{ background: rgba(99,102,241,.08); }

.res-hero__text{
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.res-hero__media{
  background:#d9ecff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.res-hero__media img{
  width: 100%;
  height: auto;
  display:block;
  object-fit: cover;
  border-radius: 14px;
}

/* Breadcrumb */
.res-bc{
  display:flex;
  align-items:center;
  gap:.9rem;
  margin: 12px 0 10px;
  font-size:14px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(0,0,0,.82);
}

.res-bc__link,
.res-bc__text{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.res-bc__link:hover{ opacity: .9; }

.res-bc__sep{
  opacity: .75;
  font-weight: 900;
  transform: translateY(-1px);
  display:inline-flex;
  align-items:center;
}

/* Responsive */
@media (max-width: 768px){
  :root{ --hero-stack-hang: 28px; }

  .res-hero--simple .res-hero__simple{ padding: 34px 0 32px; }
  .res-hero__desc{ max-width: 100%; }

  /* split -> stack on mobile */
  .res-hero__grid{
    grid-template-columns: 1fr;
  }

  .res-hero__text{
    padding: 28px 20px;
  }

  .res-hero__media{
    background: #d9ecff;
    display: block;
    min-height: 320px;        /* IMPORTANT: prevents collapse */
  }

  .res-hero__media img{
    transform: scale(1.02);
  }

  /* stack tuning */
  .res-hero--stack{
    padding-bottom: calc(22px + var(--hero-stack-hang));
  }
  .res-hero--stack .res-hero__stack{
    padding-top: 22px;
  }
  .res-hero--stack .res-hero__stackMedia img{
    max-height: 420px;
  }
}

/* ===========================
   Hub menu (Marketing Library) — polished dropdown
   =========================== */
.res-hub{ margin-bottom: 18px; }

.res-hub__bar{
  position: relative;
  display:flex;
  align-items:center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.12);
}

/* Brand */
.res-hub__brand{
  font-weight: 900;
  text-decoration: none;
  color: rgba(0,0,0,.92);
  letter-spacing: -0.01em;
}
.res-hub__brand:hover{ text-decoration: underline; }

/* Details wrapper */
.res-hub__dropdown{
  position: relative;
}

/* Toggle pill */
.res-hub__toggle{
  list-style: none;
  cursor: pointer;
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 800;
  color: rgba(0,0,0,.88);
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  user-select: none;
}
.res-hub__toggle::-webkit-details-marker{ display:none; }

.res-hub__dropdown[open] .res-hub__toggle{
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.12);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

/* caret rotate */
.res-hub__caret{
  font-size: 18px;
  line-height: 1;
  opacity: .85;
  transition: transform .15s ease;
}
.res-hub__dropdown[open] .res-hub__caret{
  transform: rotate(180deg);
}

/* Mega panel */
.res-hub__panel{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(980px, calc(100vw - 32px));
  padding: 18px 18px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.16);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
  z-index: 1000;

  /* appear animation */
  transform-origin: top left;
  animation: resHubIn .14s ease-out;
}

/* little arrow */
.res-hub__panel::before{
  content:"";
  position:absolute;
  top:-8px;
  left: 36px;
  width: 14px;
  height: 14px;
  background: rgba(255,255,255,.92);
  border-left: 1px solid rgba(0,0,0,.10);
  border-top: 1px solid rgba(0,0,0,.10);
  transform: rotate(45deg);
}

/* Sections */
.res-hub__section{ min-width: 0; }

.res-hub__heading{
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: .78rem;
  color: rgba(0,0,0,.55);
  margin-bottom: 12px;
}

.res-hub__list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap: 10px;
}

/* Link items as “soft rows” */
.res-hub__link{
  display:flex;
  align-items:center;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(0,0,0,.92);
  font-weight: 800;
  background: transparent;
  transition: background .12s ease, transform .12s ease;
}
.res-hub__link:hover{
  background: rgba(0,0,0,.05);
  transform: translateY(-1px);
}
.res-hub__link:active{
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px){
  .res-hub__bar{
    gap: 12px;
    flex-wrap: wrap;
  }
  .res-hub__panel{
    left: 0;
    right: auto;
    width: calc(100vw - 32px);
    grid-template-columns: 1fr;
  }
  .res-hub__panel::before{ left: 28px; }
}

/* Animation keyframes */
@keyframes resHubIn{
  from{ opacity: 0; transform: translateY(-6px) scale(.98); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}


/* ===========================
  Mosaic (-like) - 1 big + 3 small (Mailchimp-ish)
=========================== */

.mosaic { margin: 22px 0 40px; }

.mosaic__header{
  display:flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.mosaic__header a{
  text-decoration: none;
  color: inherit;
  font-weight: 900;
}
.mosaic__header a:hover{ text-decoration: underline; }
.mosaic__arrow{ margin-left: 6px; font-weight: 900; }

.mosaic__list{
  list-style:none;
  padding: 0;
  margin: 18px 0 0;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* ===== HERO (item 1): image LEFT, content RIGHT ===== */
.mosaic__item:nth-child(1){
  grid-column: 1 / span 3;              /* chiếm full hàng trên */
  display:grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.mosaic__item:nth-child(1) .mosaic__link{
  border-radius: 22px;
  aspect-ratio: 16 / 9;                 /* giữ khung giống Mailchimp */
}

.mosaic__item:nth-child(1) .mosaic__content{
  padding-top: 0;                       /* vì đang nằm cạnh ảnh */
}

/* ===== CARD COMMON ===== */
.mosaic__link{
  display:block;
  overflow:hidden;
  border-radius: 18px;
  background: rgba(0,0,0,.04);
  aspect-ratio: 16 / 9;                 /* QUAN TRỌNG: đặt trên link để div placeholder cũng giữ ratio */
}

/* img hoặc div placeholder đều fill khung */
.mosaic__image{
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;
}

/* text */
.mosaic__content{ padding-top: 12px; }

.mosaic__content__title a{
  text-decoration:none;
  color: rgba(0,0,0,.92);
  font-weight: 900;
}
.mosaic__content__title a:hover{ text-decoration: underline; }

.copy-eyebrow{
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(0,0,0,.55);
  font-weight: 800;
}
.copy{
  color: rgba(0,0,0,.70);
  line-height: 1.55;
  margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 992px){
  .mosaic__list{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .mosaic__item:nth-child(1){
    grid-column: 1 / span 2;
    grid-template-columns: 1fr;        /* HERO stack trên tablet */
  }
  .mosaic__item:nth-child(1) .mosaic__content{ padding-top: 12px; }
}

@media (max-width: 576px){
  .mosaic__list{ grid-template-columns: 1fr; }
  .mosaic__item:nth-child(1){ grid-column: auto; }
  .mosaic__link{ border-radius: 16px; }
}

/* ===========================
  Related Topics
  - Full width background
  - Capitalize
  - Desktop: 3 cols, max 2 rows (ẩn item dư)
=========================== */

.res-article .res-related-topics{
  margin: 30px 0 14px;
  padding: 22px 18px;
  border-radius: 16px;
  background: rgba(0,0,0,.02);
  border: 1px solid rgba(0,0,0,.08);
}

.res-article .res-related-topics--bleed{
  width: 100vw;
  position: relative;
left: 50%;
transform: translateX(-50%);
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.res-article .res-related-topics__grid{
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px 22px;
  align-items: start;
}

.res-article .res-related-topics__title{
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: clamp(22px, 1.8vw, 30px);
  margin: 0;
}

.res-article .res-related-topics__list{
  list-style: none;
  margin: 0;
  padding: 0;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto; /* ✅ 2 hàng thật */
  grid-auto-flow: row;
  gap: 10px 22px;

  overflow: hidden; /* ẩn item dư */
}

.res-article .res-related-topics__item:nth-child(n+7){
  display: none; /* ✅ 3x2 = 6 items max (5 thì ra 3 + 2) */
}

.res-article .res-related-topics__item a{
  display: inline-block;
  max-width: 100%;
  text-decoration: none;
  text-transform: capitalize;
  letter-spacing: .02em;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(13, 94, 89, .95);
  word-break: break-word;
}

.res-article .res-related-topics__item a:hover{
  text-decoration: underline;
  color: rgba(13, 94, 89, 1);
}

@media (max-width: 992px){
  .res-article .res-related-topics__grid{ grid-template-columns: 1fr; }
  .res-article .res-related-topics__list{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
  }
  .res-article .res-related-topics__item:nth-child(n+5){
    display: none; /* ✅ tablet 2x2 = 4 items max */
  }
}

@media (max-width: 576px){
  .res-article .res-related-topics{ padding: 18px 14px; }
  .res-article .res-related-topics__list{
    grid-template-columns: 1fr;
    grid-template-rows: none;
    overflow: visible;
  }
  .res-article .res-related-topics__item:nth-child(n+999){
    display: list-item;
  }
}
/* ===========================
   Related Links (footer-like)
   =========================== */
/* ===== Related Links footer — FIX for label inside UL ===== */
.res-article .res-related-links__inner{
  max-width: 980px;
  margin: 0 auto;
}

/* UL becomes the flex row */
.res-article .res-related-links__list{
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}

/* label is just a flex item */
.res-article .res-related-links__label{
  flex: 0 0 auto;
  font-weight: 900;
  font-size: .92rem;
  white-space: nowrap;
  margin: 0;
}

/* links as flex items */
.res-article .res-related-links__item{
  flex: 0 1 auto;
  min-width: 0;
}

.res-article .res-related-links__link{
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 650;
}

/* footer variant: full-bleed and NO gap */
.res-article .res-related-links--footer{
  margin: 0 !important;
  padding: 18px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #212529 !important;

  /* full-bleed without shift */
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

/* colors on dark */
.res-article .res-related-links--footer .res-related-links__label{
  color: rgba(255,255,255,.85) !important;
}
.res-article .res-related-links--footer .res-related-links__link{
  color: rgba(255,255,255,.92) !important;
  text-decoration-color: rgba(255,255,255,.55) !important;
}
.res-article .res-related-links--footer .res-related-links__link:hover{
  color: #fff !important;
  text-decoration-color: rgba(255,255,255,.9) !important;
}

/* responsive: label goes full width */
@media (max-width: 992px){
  .res-article .res-related-links__label{
    flex-basis: 100%;
  }
}

/* =========================
   Quote block (res-quote) — Mailchimp-ish, safe layout
   - No 100vw bleed to avoid left shift
   - Centered content, readable size
========================= */

.res-article .res-block.res-quote{
  /* bỏ full-bleed gây lệch */
  width: auto;
  margin-left: 0;
  margin-right: 0;

  background: #E5B75A;
  border-radius: 18px;
  padding: clamp(28px, 4vw, 56px) clamp(18px, 3vw, 44px);
  margin: 32px auto;

  /* center */
  display: block;
  text-align: center;

  /* keep inside article width */
  max-width: 980px;
}

/* quote text wrapper */
.res-article .res-quote__text{
  margin: 0;
  padding: 0;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/* quote text (reduce size + weight) */
.res-article .res-quote__text,
.res-article .res-quote__text p{
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  font-weight: 700;             /* giảm từ 800 */
  letter-spacing: -0.01em;
  line-height: 1.18;
  color: #111;
  font-size: clamp(20px, 2.2vw, 34px);  /* ✅ nhỏ lại */
}

/* paragraph rhythm */
.res-article .res-quote__text p{ margin: 0; }
.res-article .res-quote__text p + p{ margin-top: 12px; }

/* caption: 1 dòng/2 dòng đẹp, không bị thành cột */
.res-article .res-quote__cap{
  max-width: 860px;
  margin: 18px auto 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(17,17,17,.92);
  line-height: 1.35;
}

/* author / role */
.res-article .res-quote__author::before{ content: "— "; }
.res-article .res-quote__author{ font-weight: 700; }

.res-article .res-quote__role{
  display: inline;               /* giữ inline */
  font-weight: 600;
  opacity: .95;
}
.res-article .res-quote__role::before{ content: ", "; }

/* mobile */
@media (max-width: 576px){
  .res-article .res-block.res-quote{
    border-radius: 16px;
    padding: 28px 16px;
    margin: 22px auto;
  }
  .res-article .res-quote__text,
  .res-article .res-quote__text p{
    font-size: 20px;
    line-height: 1.22;
  }
  .res-article .res-quote__cap{ font-size: 13px; }
}


/* ===========================
   Footer Seam Fix (Resources only)
   - kill the white gap between related-links--footer and real footer
   =========================== */

/* 1) Không cho article/wrap/body chừa đáy sau block cuối */
.res-article { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.res-article > .wrap { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.res-article .body { margin-bottom: 0 !important; padding-bottom: 0 !important; }

/* 2) Nếu theme có style kiểu: section:last-child { margin-bottom: ... } */
.res-article .body > :last-child { margin-bottom: 0 !important; }

/* 3) block related-links footer: đảm bảo không tự đẻ margin */
.res-article .res-related-links--footer{
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 4) đề phòng footer bị theme add margin-top */
.layout-wrapper.landing > footer.custom-footer{
  margin-top: 0 !important;
}

/* 5) Nếu muốn "liền màu" tuyệt đối với bg-dark của Bootstrap */
.res-article .res-related-links--footer{
  background: #212529; /* bg-dark chuẩn bootstrap */
}


/* ===== promo_card ===== */
.mc-promo{
  margin: 28px 0;
}

.mc-promo__inner{
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.mc-promo__copy{ padding: 6px; }
.mc-promo__eyebrow{
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: 8px;
}

.mc-promo__title{
  margin: 0 0 10px 0;
  font-size: 32px;
  line-height: 1.1;
}

.mc-promo__desc{
  margin: 0 0 14px 0;
  font-size: 16px;
  line-height: 1.5;
  opacity: .9;
  max-width: 52ch;
}

.mc-promo__cta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.10);   /* default hover base */
  color: #0b1220;
  transition: background .15s ease, color .15s ease;
}

.mc-promo__cta:hover{
  background: #2563eb;
  color: #fff;
}

.mc-promo__media img{
  width: 100%;
  height: auto;
  display: block;
}

/* desktop: copy left, image right */
@media (min-width: 992px){
  .mc-promo__inner{
    grid-template-columns: 1.1fr 0.9fr;
    padding: 28px;
    gap: 22px;
  }
  .mc-promo__title{ font-size: 40px; }
}

/* ===== subscribe_form ===== */
/* ===== subscribe_form (full width) ===== */
.mc-subscribe{
  margin: 34px 0;
  width: 100%;
}

/* nếu block đang nằm trong .container của bootstrap thì cái này giúp nó “bung” */
.mc-subscribe{
  max-width: 100%;
}

/* khung nền đen bung hết chiều ngang vùng chứa */
.mc-subscribe__inner{
  background: #1f1b13;
  color: #fff;
  border-radius: 18px;
  padding: 34px 18px;
  text-align: center;

  width: 100%;
  max-width: 100%;
}

/* title */
.mc-subscribe__title{
  font-size: 44px;
  line-height: 1.05;
  margin: 0 0 18px 0;
}

/* form + consent bung full ngang */
.mc-subscribe__form{
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.mc-subscribe__grid{
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  text-align: left;
  margin: 0 0 12px 0;
}

.mc-subscribe__label{
  display: block;
  font-size: 13px;
  opacity: .9;
  margin-bottom: 6px;
}

.mc-subscribe__field input,
.mc-subscribe__field select{
  width: 100%;
  height: 52px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: #fff;
  padding: 10px 12px;
  font-size: 16px;
}

.mc-subscribe__consent{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;

  width: 100%;
  max-width: 100%;
  margin: 10px 0 0 0;
  opacity: .9;
  font-size: 12px;
}

/* nút giữa */
.mc-subscribe__actions{
  margin-top: 16px;
  display: grid;
  place-items: center;
  gap: 10px;
}

.mc-subscribe__btn{
  border: 0;
  background: #facc15;
  color: #111827;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
}

.mc-subscribe__msg{
  font-size: 13px;
  color: #fecaca;
  min-height: 18px;
}

.mc-subscribe__successText{
  font-size: 28px;
  font-weight: 700;
}

/* desktop: 2 cột */
@media (min-width: 992px){
  .mc-subscribe__inner{ padding: 56px 34px; }
  .mc-subscribe__grid{
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}


/* =========================================================
   RES- media quotes FINAL OVERRIDE (put this at the VERY END)
   - Forces BLUE (no gray)
   - 30/70 layout (media/text)
   - Mailchimp-ish typography
   - Bold highlight copy
   - Prevent image stretching
   ========================================================= */

/* tokens (edit HERE only) */
:root{
  --mq-blue-solid: #b3e716; /* nền xanh nhạt (value cao) */
  --mq-blue-left:  #b3e716; /* panel trái (có thể đậm hơn chút nếu muốn) */
  --mq-ink: #0B0F1A;        /* chữ đen mềm */
}

/* Force apply (both scoped + non-scoped) */
.res-mq.res-mq--blue .res-mq__inner,
.res-article .res-mq.res-mq--blue .res-mq__inner{
  display: grid !important;
  grid-template-columns: 0.30fr 0.70fr !important; /* ✅ 30/70 */
  border-radius: 16px !important;
  overflow: hidden !important;

  background: var(--mq-blue-solid) !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
}

/* Ensure media LEFT, text RIGHT (kill old order:-1 anywhere) */
.res-mq.res-mq--blue .res-mq__media,
.res-article .res-mq.res-mq--blue .res-mq__media{
  order: 0 !important;
  background: var(--mq-blue-left) !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 14px !important;
}

.res-mq.res-mq--blue .res-mq__text,
.res-article .res-mq.res-mq--blue .res-mq__text{
  order: 1 !important;

  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;

  padding: 22px 26px !important;
  text-align: left !important;
}

/* Prevent “proportion lỗi” (no stretching) */
.res-mq.res-mq--blue .res-mq__media img,
.res-article .res-mq.res-mq--blue .res-mq__media img{
  width: auto !important;           /* ✅ KHÔNG width:100% */
  height: auto !important;
  max-width: 240px !important;      /* chỉnh tuỳ mắt */
  max-height: 190px !important;
  display: block !important;
  object-fit: contain !important;

  /* nếu icon bị nhạt: bật filter */

  opacity: 1 !important;
}

/* Mailchimp-ish typography (đậm, gọn, ngay ngắn) */
.res-mq.res-mq--blue .res-mq__title,
.res-article .res-mq.res-mq--blue .res-mq__title{
  margin: 0 0 10px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;      /* ✅ title đậm */
  font-size: 22px !important;       /* giống “headline” Mailchimp */
  color: var(--mq-ink) !important;
}

.res-mq.res-mq--blue .res-mq__copy,
.res-article .res-mq.res-mq--blue .res-mq__copy{
  margin: 0 !important;
  line-height: 1.55 !important;
  max-width: 56ch !important;       /* ✅ chữ gọn, không “loang” */
  font-size: 18px !important;
  font-weight: 700 !important;      /* ✅ highlight đậm */
  color: rgba(11, 15, 26, .86) !important;
}

/* Mobile: stack */
@media (max-width: 768px){
  .res-mq.res-mq--blue .res-mq__inner,
  .res-article .res-mq.res-mq--blue .res-mq__inner{
    grid-template-columns: 1fr !important;
  }

  .res-mq.res-mq--blue .res-mq__media,
  .res-article .res-mq.res-mq--blue .res-mq__media{
    padding: 12px !important;
  }

  .res-mq.res-mq--blue .res-mq__text,
  .res-article .res-mq.res-mq--blue .res-mq__text{
    padding: 18px 18px !important;
  }
}


/* BLOCK MEDIA*/
.res-media{margin:22px auto; text-align:center;}
.res-media--sm{max-width:720px;}
.res-media--md{max-width:920px;}
.res-media--lg{max-width:1100px;}
.res-media--full{max-width:100%;}

.res-media__frame{
  position:relative;
  overflow:hidden;
  border-radius:16px;
  background:rgba(0,0,0,.04);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  margin-inline:auto;
}

/* ratio boxes */
.res-media__frame--16-9{aspect-ratio:16/9;}
.res-media__frame--4-3{aspect-ratio:4/3;}
.res-media__frame--1-1{aspect-ratio:1/1;}

.res-media__img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
}

.res-media__cap{
  margin-top:10px;
  font-size:.95rem;
  color:rgba(0,0,0,.65);
}

.res-related-links--footer{ margin-bottom: 0 !important; }
.res-related-links--footer + footer,
.res-related-links--footer + footer.custom-footer{
  margin-top: 0 !important;
  padding-top: 0 !important;
}
footer.custom-footer{ margin-top: 0 !important; padding-top: 0 !important; }


/* =========================================================
   RESOURCES — TOC (FINAL)
   - Desktop: left sticky TOC + right content (only list scrolls)
   - Mobile: button + bottom sheet drawer
   - Avoid hero split/stack overlap (z-index + spacing)
   - Kill sticky blockers on wrappers (overflow/transform/contain)
   ========================================================= */

/* =============== 0) Sticky prerequisites (ONLY on resources pages) =============== */
/* If you want to scope tighter, wrap these under .res-page or .res-article parent */
html, body{
  height: auto !important;
  overflow-y: auto !important;
}

/* common theme wrappers that can break sticky by overflow/transform/contain */
.layout-wrapper,
.layout-wrapper.landing,
.main-content,
.page-content,
.content,
.content-wrapper,
.app-content,
.main,
main{
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;

  height: auto !important;
  max-height: none !important;

  transform: none !important;
  filter: none !important;
  perspective: none !important;
  contain: none !important;
}

/* ensure article ancestors do not become scroll containers */
.res-article,
.res-article .wrap,
.res-article .body,
.res-toc-layout{
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;

  height: auto !important;
  max-height: none !important;

  transform: none !important;
  filter: none !important;
  perspective: none !important;
}

/* =============== 1) Layering / overlap with hero split/stack =============== */
.res-hero{ position: relative; z-index: 1; }
.res-toc-layout{ position: relative; z-index: 20; }
.res-article{ position: relative; z-index: 10; }

/* If hero has “hang down” effect, push next section down */
.res-hero--stack + .res-article{
  margin-top: var(--hero-stack-hang, 46px) !important;
}

/* If your TOC layout is directly after hero (rare), push it too */
.res-hero--stack + .res-toc-layout{
  margin-top: calc(var(--hero-stack-hang, 46px) + 14px) !important;
}

/* =============== 2) Desktop layout (sticky left, content right) =============== */
/* mobile-first */
.res-toc-layout{
  display: block;
  margin: 18px 0 24px;
}

/* left aside + right content containers */
.res-toc-aside{ width: 100%; }
.res-toc-main{ margin-top: 14px; }

/* the toc box itself (shared base styles) */
.res-toc-box{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 .15rem .8rem rgba(15,15,15,.04);
  padding: 14px;
}

/* optional: allow JS to hide if empty */
.res-toc-box.is-hidden{ display: none !important; }

.res-toc-title{
  font-weight: 900;
  font-size: .95rem;
  margin: 0 0 10px;
  color: rgba(0,0,0,.86);
  letter-spacing: -0.01em;
}

/* list base */
.res-toc-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;

  /* numbering */
  counter-reset: toc-item;
}

.res-toc-list > li{
  margin: 0;
  padding: 0;
  counter-increment: toc-item;
}

.res-toc-list > li > a{
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  text-decoration: none;
  color: rgba(0,0,0,.74);
  font-weight: 650;
  line-height: 1.35;
}

.res-toc-list > li > a::before{
  content: counter(toc-item) ". ";
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.res-toc-list > li > a:hover{
  color: rgba(0,0,0,.92);
  text-decoration: underline;
}

/* level styling */
.res-toc-list .lvl-2 > a{ font-size: .98rem; }
.res-toc-list .lvl-3 > a{
  font-size: .94rem;
  font-weight: 600;
  padding-left: 14px;
  color: rgba(0,0,0,.68);
}

/* active item */
.res-toc-list li.is-active > a{
  color: rgba(0,0,0,.92);
  font-weight: 800;
  text-decoration: none;
}

/* Desktop grid + sticky */
@media (min-width: 992px){
  .res-toc-layout{
    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  .res-toc-main{
    margin-top: 0 !important;
    min-width: 0;
  }

  /* keep reading width comfortable even when container is wide */
  .res-toc-main{ min-width: 0; }
  .res-toc-main > *{ max-width: 72ch; }

  /* allow intentional full-bleed blocks to stay full width */
  .res-toc-main .res-cta-center,
  .res-toc-main .res-related-topics--bleed,
  .res-toc-main .res-related-links--footer,
  .res-toc-main figure,
  .res-toc-main .res-media--full{
    max-width: none;
  }

  .res-toc-aside{
    position: sticky !important;
    top: var(--toc-sticky-top) !important;
    align-self: start;
    z-index: 60;
    overflow: visible !important;
  }

  /* box fills the sticky area; ONLY list scrolls */
  .res-toc-box{
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;

    height: calc(100vh - var(--toc-sticky-top) - 16px) !important;
    max-height: calc(100vh - var(--toc-sticky-top) - 16px) !important;

    overflow: hidden !important;
  }

  .res-toc-title{ flex: 0 0 auto !important; }

  .res-toc-list{
    flex: 1 1 auto !important;
    min-height: 0 !important;

    overflow: auto !important;
    overscroll-behavior: contain;
    padding-right: 10px;
    padding-bottom: 10px;
  }
}

/* Mobile spacing tweaks */
@media (max-width: 576px){
  .res-toc-box{
    padding: 12px;
  }
  .res-toc-layout{
    margin: 16px 0 20px;
  }
}

/* =============== 3) Mobile drawer TOC (button + bottom sheet) =============== */
/* Hidden by default; show when body has .toc-lock */
.res-toc-mobile__backdrop,
.res-toc-mobile__panel{
  display: none;
}

body.toc-lock .res-toc-mobile__backdrop,
body.toc-lock .res-toc-mobile__panel{
  display: block;
}

.res-toc-mobile{
  margin: 0 0 14px;
  position: relative;
  z-index: 70; /* above hero overlap */
}

.res-toc-mobile__btn{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  font-weight: 700;
}

.res-toc-mobile__chev{ transform: translateY(1px); }

.res-toc-mobile__backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 9998;
}

.res-toc-mobile__panel{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;

  max-height: 72vh;
  overflow: auto;

  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.08);
  z-index: 9999;
  padding: 12px 12px 8px;
}

.res-toc-mobile__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 6px 6px 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  margin-bottom: 10px;
}

.res-toc-mobile__title{ font-weight: 800; }

.res-toc-mobile__close{
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 10px;
}

/* lock page scroll when drawer open */
body.toc-lock{ overflow: hidden !important; }

/* On mobile: hide left sticky aside entirely */
@media (max-width: 991.98px){
  .res-toc-aside{ display: none; }
  .res-toc-main{ margin-top: 0 !important; }
}

/* =============== 4) Scrollbar polish =============== */
.res-toc-list::-webkit-scrollbar,
.res-toc-mobile__panel::-webkit-scrollbar{
  width: 10px;
}
.res-toc-list::-webkit-scrollbar-thumb,
.res-toc-mobile__panel::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* =============== 5) Optional: Section divider for H2 (kept, minimal) =============== */
.res-article .body h2:first-of-type{
  padding-top: 0;
}
.res-article .body h2:first-of-type::before{
  display: none;
}
/* ===== TOC FIXED FALLBACK (FINAL) ===== */
@media (min-width: 992px){
  .res-toc-aside.is-fixed{
    position: fixed !important;
    top: var(--toc-sticky-top) !important;
    z-index: 999 !important;
  }

  /* giữ đúng width khi fixed */
  .res-toc-aside.is-fixed .res-toc-box{
    width: var(--toc-fixed-w, 240px) !important;
  }
}

/* ==== FIX sticky TOC bị chết do landing wrapper tạo scroll container ==== */
html, body {
  height: auto !important;
  overflow: visible !important;
}

.res-toc-layout{
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 992px){
  .res-toc-layout{ grid-template-columns: 1fr; }
  .res-toc-aside{ display:none; }
}

/* sticky box */
.res-toc-aside{ align-self: start; }
.res-toc-box{
  position: sticky;
  top: calc(var(--navbar-h, 72px) + 16px);
}
/* Velzon landing wrapper hay set overflow/height làm sticky fail */
.layout-wrapper.landing{
  overflow: visible !important;
  height: auto !important;
  min-height: 100vh;
  transform: none !important;          /* nếu theme có transform */
  filter: none !important;              /* nếu theme có filter */
  perspective: none !important;         /* nếu theme có perspective */
  contain: none !important;             /* nếu theme có contain */
}

/* (tuỳ theme) có khi main container khác cũng set overflow */
.layout-wrapper,
.landing,
.custom-container,
.res-article,
.res-article .wrap,
.res-toc-layout{
  overflow: visible !important;
}
/* TOC sticky đừng đè footer */
.res-toc-aside,
.res-toc-box{
  z-index: 5 !important;   /* thấp thôi, chỉ cần hơn content */
}

/* Footer phải nằm trên TOC khi chạm tới footer */
.custom-footer{
  position: relative;
  z-index: 20 !important;
}
.res-toc-layout { position: relative; }

.res-toc-box{
  position: sticky;
  top: calc(var(--navbar-h, 72px) + 16px);
  z-index: 5;
  max-height: calc(100vh - var(--navbar-h, 72px) - 24px);
  overflow: auto;
}

.res-toc-layout.is-toc-stopped .res-toc-box{
  position: absolute;
  top: auto;
  bottom: 0;
}