/* ===== Bố cục bài viết RỘNG — dùng chung cho tin-*.html, white-paper-*.html và bài đăng từ CMS =====
   Móc vào các lớp art-* (trang tĩnh gắn sẵn trong HTML; bài CMS được js/article-page.js gắn khi tải).
   - Khung tối đa 1680px, lề hai bên co theo màn hình.
   - >= 1280px: 3 cột  [mục lục | bài viết | liên quan], hai cột bên co giãn theo bề ngang màn hình.
   - 1024–1279px: 2 cột [mục lục | bài viết], cột liên quan xuống cuối bài (chia 2 cột).
   - < 1024px: 1 cột (mục lục ẩn như cũ).
   - Chữ thân bài 17–19px, dòng chữ tối đa 960px; ảnh / bảng / video giãn hết bề ngang cột bài. */

.art-main, .art-hero {
  max-width: 1680px !important;
  padding-left: clamp(1rem, 3vw, 3.5rem) !important;
  padding-right: clamp(1rem, 3vw, 3.5rem) !important;
}
.art-hero h1 { max-width: 62rem; }

.art-body {
  max-width: none !important;
  width: 100%;
  min-width: 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (min-width: 1024px) {
  .art-grid {
    display: grid !important;
    grid-template-columns: clamp(200px, 18vw, 240px) minmax(0, 1fr) !important;
    column-gap: 2rem !important;
  }
  .art-rel { grid-column: 2; margin-top: 3.5rem !important; }
  .art-rel > .sticky { position: static; }
  .art-rel > #relatedBox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
  .art-rel > #relatedBox > * { margin-top: 0 !important; }
  .art-rel > #relatedBox > a:last-child { grid-column: 1 / -1; }
  /* bài không đủ mục để dựng mục lục → bỏ hẳn cột trái, bài viết chiếm chỗ */
  .art-grid.art-notoc { grid-template-columns: minmax(0, 1fr) !important; }
  .art-grid.art-notoc > .art-toc { display: none !important; }
  .art-grid.art-notoc > .art-rel { grid-column: 1; }
}

@media (min-width: 1280px) {
  .art-grid {
    grid-template-columns: clamp(220px, 15vw, 260px) minmax(0, 1fr) clamp(280px, 19vw, 340px) !important;
    column-gap: clamp(2rem, 2.6vw, 3rem) !important;
  }
  .art-rel { grid-column: auto; margin-top: 0 !important; }
  .art-rel > .sticky { position: sticky; }
  .art-rel > #relatedBox { display: block; }
  .art-rel > #relatedBox > * + * { margin-top: 1.5rem !important; }
  .art-grid.art-notoc { grid-template-columns: minmax(0, 1fr) clamp(280px, 19vw, 340px) !important; }
  .art-grid.art-notoc > .art-rel { grid-column: auto; }
}

/* Chữ thân bài co giãn theo màn hình */
.art-body .article-content {
  font-size: clamp(1.0625rem, 0.96rem + 0.28vw, 1.1875rem);
  line-height: 1.8;
}
.art-body .article-content h2 { font-size: clamp(1.45rem, 1.2rem + 0.6vw, 1.85rem); }
.art-body .article-content h3 { font-size: clamp(1.2rem, 1.05rem + 0.35vw, 1.4rem); }
.art-body .article-content table { font-size: 0.92em; }

/* Dòng chữ không quá dài (~960px) — ảnh, bảng, video, hình vẫn giãn hết cột */
.art-body .article-content p,
.art-body .article-content ul,
.art-body .article-content ol,
.art-body .article-content dl,
.art-body .article-content blockquote,
.art-body .article-content h2,
.art-body .article-content h3,
.art-body .article-content h4,
.art-body .article-content h5 { max-width: 960px; }

/* chống tràn ngang trên điện thoại */
.art-body .article-content img, .art-body .article-content video, .art-body .article-content iframe { max-width: 100%; }
.art-body .article-content pre { overflow-x: auto; }
.art-body .article-content a { overflow-wrap: anywhere; }

/* cột bài rộng hơn dòng chữ → canh khối chữ ra giữa cột, ảnh / bảng vẫn hết cột */
.art-body .article-content p,
.art-body .article-content ul,
.art-body .article-content ol,
.art-body .article-content dl,
.art-body .article-content blockquote,
.art-body .article-content h2,
.art-body .article-content h3,
.art-body .article-content h4,
.art-body .article-content h5 { margin-left: auto; margin-right: auto; }
.art-body .article-content li > ul, .art-body .article-content li > ol { margin-left: 0; }
.art-body .article-content td p, .art-body .article-content th p { margin-left: 0; margin-right: 0; }

/* ===== Khối do CMS mới (quan-tri/cms.html, 03/12/2026) chèn vào thân bài: CTA cuối bài, Mẹo, Các bước ===== */
.article-content .cta-box{background:#0b1220;color:#fff;border-radius:1rem;padding:1.4em 1.6em;margin:2em 0;border:1px solid rgba(96,165,250,.25)}
.article-content .cta-box .title{font-weight:800;font-size:1.15em;margin:0 0 .35em;color:#fff}
.article-content .cta-box .sub{color:#cbd5e1;font-size:.95em;margin:0 0 1em}
.article-content .cta-box a{color:#93c5fd}
.article-content .cta-box .cta-btn{display:inline-block;background:#2563eb;color:#fff;font-weight:700;border-radius:.6rem;padding:.6em 1.2em;text-decoration:none}
.article-content .cta-box .cta-btn:hover{background:#1d4ed8}
.article-content .wp-tip{display:flex;gap:.75em;background:#eff6ff;border:1px solid #bfdbfe;border-radius:.75rem;padding:.85em 1.1em;margin:1.2em 0}
.article-content .wp-tip i{color:#1d4ed8;margin-top:.3em}
.article-content .wp-tip p{margin:0}
.article-content ol.wp-steps{counter-reset:buoc;list-style:none;padding-left:0}
.article-content ol.wp-steps>li{counter-increment:buoc;position:relative;padding-left:2.6em;margin:.7em 0}
.article-content ol.wp-steps>li:before{content:counter(buoc);position:absolute;left:0;top:0;width:1.8em;height:1.8em;border-radius:999px;background:#2563eb;color:#fff;font-weight:700;font-size:.9em;display:flex;align-items:center;justify-content:center}
