/* mobile.css — tối ưu hiển thị điện thoại cho mọi trang & bài viết (26/10/2026, CTO Master Cường Boss).
   Nạp SAU mọi CSS khác của trang. Chỉ tác động màn ≤ 760px (trừ mục 1 & 6 áp dụng mọi cỡ). */

/* 1. Liên kết dài (facebook.com/…, email) không làm tràn ngang ô liên hệ */
.contact-list li > span:last-child { min-width: 0; }
.contact-list a { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  /* 2. Bảng trong bài viết / tài liệu: không bẻ chữ giữa từ, cuộn ngang khi bảng rộng */
  html body :where(article, main, .wrap) table,
  html body article.wrap table { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  html body :where(article, main, .wrap) table :is(th, td) { overflow-wrap: normal; word-break: normal; hyphens: manual; min-width: 6.5em; }
  html body :where(article, main, .wrap) table :is(th, td) code { white-space: nowrap; }
  html body :where(article, main, .wrap) table th { font-size: 0.75rem; letter-spacing: 0.05em; line-height: 1.45; }
  html body article.wrap th { font-size: 0.75rem; letter-spacing: 0.06em; }
  html body :where(article, main, .wrap) table :is(th, td):first-child { min-width: 7.5em; }

  /* 3. Chân trang bài viết / tài liệu: cùng nhịp với trang chính (bỏ cỡ chữ & khoảng cách thừa của khung bài viết) */
  .site-footer .footer__list { gap: 4px; }
  .site-footer .footer__list li { margin: 0; font-size: 14px; line-height: 1.5; }
  .site-footer .footer__list a { display: inline-block; padding: 9px 0; font-size: 14px; }

  /* 4. Vùng bấm đủ lớn cho link điều hướng nhỏ */
  p.mcb-back a, .mcb-subbar a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; }
  .crumbs a, .breadcrumb a, nav[aria-label*="Breadcrumb" i] a { display: inline-block; padding: 6px 0; }

  /* 5. Nút kêu gọi trong bài viết: gọn 1 dòng, không giãn chữ quá rộng */
  html body article.wrap .cta { padding: 24px 20px; }
  html body article.wrap .cta a, article .cta > a { display: flex; justify-content: center; width: 100%; letter-spacing: 0.05em; line-height: 1.35; padding: 14px 16px; text-align: center; }

  /* 6. Khối mã có nút COPY: chừa chỗ để nút không đè dòng đầu */
  pre:has(> button.cp) { padding-top: 2.75rem; }

  /* 7. Bảng so sánh chương trình (/chuong-trinh/): cột tên tiêu chí đứng yên khi vuốt ngang */
  .table-wrap table.compare :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--paper, #efe8da); box-shadow: 1px 0 0 var(--line, rgba(27,21,18,.12)); }

  /* 8. Chữ nhãn quá nhỏ */
  .tl-ai__cmd-k, .tag, .tt-cat__c { font-size: 0.75rem; }
}

/* 04/11/2026 — biểu mẫu gọn: phần thông tin thêm thu gọn */
.form-more{margin:4px 0 18px;border:1px solid var(--line,#d9cfbb);border-radius:10px;background:rgba(255,255,255,.35)}
.form-more>summary{cursor:pointer;list-style:none;padding:14px 44px 14px 16px;font-weight:600;font-size:.95rem;display:block;position:relative}
.form-more>summary::-webkit-details-marker{display:none}
.form-more>summary span{display:block;font-weight:400;color:var(--muted,#6b6f78);font-size:.85rem}
.form-more>summary::after{content:"+";position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:1.3rem;line-height:1;color:var(--brass-3,#a87a3d)}
.form-more[open]>summary::after{content:"−"}
.form-more__in{padding:0 16px 6px}
/* 04/11/2026 — hộp đồng ý cookie gọn trên điện thoại: một thanh mỏng dưới đáy */
@media (max-width:560px){
  html body #mcb-ck{left:0;right:0;bottom:0;width:auto;border-radius:12px 12px 0 0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:10px;font-size:.78rem;line-height:1.4}
  html body #mcb-ck p{margin:0;flex:1}
  html body #mcb-ck .mcb-ck__b{flex-direction:column;gap:6px;flex:none}
  html body #mcb-ck button{flex:none;min-height:34px;padding:0 14px;font-size:.8rem}
}

/* 08/11/2026 — lối vào lớp học (/hoc-vien/) ở góc phải menu: chỉ hiện khi đủ chỗ (≥1280px), hẹp hơn thì vào qua menu "Học viên" */
.nav__login { white-space: nowrap; }
.nav__login svg { flex: none; }
@media (max-width: 1279px) { .nav__login { display: none !important; } }
