/* =========================================================
   TIN TỨC AI — giao diện đồng bộ web mới (Ink · Ivory · Brass)
   Nạp SAU legacy.css (giữa mốc MCB-TINTUC). Dùng token của /assets/css/styles.css.
   Áp cho: /tin-tuc/index.html (danh sách) + mọi bài có <article class="wrap">.
   Tạo 18/10/2026 — chạy lại: python3 dong-bo-tin-tuc.py --all
   ========================================================= */

/* 0. Trang có hero tối: hero tự chừa chỗ cho header cố định */
html body.tt { padding-top: 0; background: var(--paper); }

/* 1. Hero tối (danh sách + đầu bài) */
.tt-hero .container { max-width: calc(var(--container) + var(--gutter) * 2); padding-inline: var(--gutter); margin-inline: auto; }
html body .tt-hero nav.breadcrumbs { position: static; top: auto; z-index: auto; height: auto; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.tt-hero .breadcrumbs ol { margin: 0; padding: 0; }
.tt-hero .breadcrumbs li { margin: 0; font-size: inherit; }
.tt-hero .breadcrumbs a { color: inherit; text-decoration: none; }
html body .tt-hero h1 { color: var(--text-inv); margin: 24px 0 0; }
html body .tt-hero h1 em { font-style: italic; color: var(--brass-2); }
html body .tt-hero p { margin: 0; font-size: inherit; }
html body .tt-hero .eyebrow { margin-top: 32px; color: var(--brass); }
html body .tt-hero .page-hero__lead { margin-top: 24px; font-size: var(--fs-lg); color: var(--text-inv-2); }
.tt-hero--post .page-hero__title { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.12; max-width: 26ch; }
.tt-hero--post .page-hero__lead { max-width: 64ch; }

/* 2. Danh sách bài (/tin-tuc/) */
.tt-list { padding-block: clamp(48px, 6vw, 96px) clamp(72px, 8vw, 128px); }
.tt-list .wrap { max-width: calc(920px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.tt-group { margin: 0 0 16px; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass-3); }
.tt-group--sp { margin-top: 48px; }
html body .tt-list .post {
  display: grid; grid-template-columns: 148px minmax(0, 1fr); column-gap: 28px; align-items: start;
  padding: 26px 28px; margin: 0 0 12px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--white); color: var(--text); text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
html body .tt-list .post:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--brass); }
html body .tt-list .post .meta {
  grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 4px 0 0;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
html body .tt-list .post .meta .tag {
  display: inline-block; padding: 0; background: none; border-radius: 0; font-size: 0.6875rem; line-height: 1.5;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-3);
}
html body .tt-list .post h2 { grid-column: 2; margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h4); line-height: 1.28; color: var(--text); }
html body .tt-list .post p { grid-column: 2; margin: 8px 0 0; font-size: var(--fs-sm); line-height: 1.65; color: var(--text-2); }
/* Thẻ "Khu vực học viên" — khối tối như trang Tài liệu */
html body .tt-list .post--feature { position: relative; overflow: hidden; background: var(--ink); border-color: rgba(198, 161, 91, 0.35); color: var(--text-inv); }
html body .tt-list .post--feature::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(80% 60% at 100% 0%, rgba(198, 161, 91, 0.18), transparent 60%); }
html body .tt-list .post--feature > * { position: relative; }
html body .tt-list .post--feature .meta { color: var(--brass); }
html body .tt-list .post--feature .meta .tag { color: var(--brass-2); }
html body .tt-list .post--feature h2 { color: var(--text-inv); }
html body .tt-list .post--feature p { color: var(--text-inv-2); }
html body .tt-list .post--feature:hover { border-color: var(--brass); }
.tt-list .mcb-back { margin-top: 40px; }
@media (max-width: 720px) {
  html body .tt-list .post { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  html body .tt-list .post .meta { grid-row: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 10px; }
  html body .tt-list .post h2, html body .tt-list .post p { grid-column: 1; }
}

/* 3. Thân bài viết */
html body article.wrap { max-width: calc(760px + var(--gutter) * 2); margin-inline: auto; padding: clamp(48px, 6vw, 80px) var(--gutter) clamp(64px, 8vw, 112px); color: var(--text-2); line-height: 1.78; }
html body article.wrap > .meta { margin: 0 0 12px; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.16em; color: var(--brass-3); }
html body article.wrap h1 { font-weight: 400; color: var(--text); }
html body article.wrap h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem); line-height: 1.25; color: var(--text); margin: 2.2em 0 0.6em; }
html body article.wrap h3 { font-family: var(--font-sans); font-weight: 600; font-size: var(--fs-md); color: var(--text); margin: 1.7em 0 0.5em; }
html body article.wrap p, html body article.wrap li { font-size: 1.0625rem; color: var(--text-2); }
html body article.wrap li::marker { color: var(--brass-3); }
html body article.wrap b, html body article.wrap strong { color: var(--text); font-weight: 600; }
html body article.wrap a:not(.btn):not([class]) { color: var(--text); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; }
html body article.wrap a:not(.btn):not([class]):hover { color: var(--brass-3); }
html body article.wrap .sapo, html body article.wrap .sapo2 { font-size: var(--fs-lg); font-weight: 300; line-height: 1.6; color: var(--text-2); border-left: 2px solid var(--brass); padding-left: 20px; }
html body article.wrap .quick-answer { background: var(--white); border: 1px solid var(--line); border-left: 2px solid var(--brass); border-radius: var(--radius); color: var(--text-2); padding: 20px 24px; }
html body article.wrap .quick-answer b { color: var(--text); }

/* Khối chữ tối (thay khung xanh gradient cũ) */
html body article.wrap .hero { position: relative; overflow: hidden; background: var(--ink); color: var(--text-inv); border: 1px solid rgba(198, 161, 91, 0.35); border-radius: var(--radius-lg); padding: clamp(26px, 3.4vw, 40px); }
html body article.wrap .hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(80% 60% at 100% 0%, rgba(198, 161, 91, 0.16), transparent 60%); }
html body article.wrap .hero > * { position: relative; }
html body article.wrap .hero b { font-family: var(--font-serif); font-weight: 400; color: var(--brass-2); }
html body article.wrap .hero span { color: var(--text-inv-2); }

/* Bảng */
html body article.wrap table { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 0.9375rem; }
html body article.wrap th { background: var(--paper-2); color: var(--text); font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
html body article.wrap td { border-top: 1px solid var(--line); color: var(--text-2); }
html body article.wrap tr:first-child td { border-top: 0; }
html body article.wrap td:first-child { color: var(--text); font-weight: 600; }

/* Hộp ghi chú */
html body article.wrap .box { background: var(--white); border: 1px solid var(--line); border-left: 2px solid var(--brass); border-radius: var(--radius); color: var(--text-2); padding: 20px 24px; }
html body article.wrap .box.red { background: rgba(194, 85, 74, 0.05); border-color: rgba(194, 85, 74, 0.22); border-left-color: var(--err); }
html body article.wrap .box.green { background: rgba(63, 158, 122, 0.06); border-color: rgba(63, 158, 122, 0.24); border-left-color: var(--ok); }
html body article.wrap .box.blue { background: rgba(142, 156, 255, 0.07); border-color: rgba(142, 156, 255, 0.28); border-left-color: var(--ai); }
html body article.wrap .box b { color: var(--text); }

/* Khối lệnh / prompt */
html body article.wrap pre { background: var(--ink-2); color: var(--text-inv); border: 1px solid var(--line-inv-strong); border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.75; }
html body article.wrap code { font-family: var(--font-mono); font-size: 0.9em; }
html body article.wrap :not(pre) > code { background: var(--paper-2); border-radius: 4px; padding: 0.1em 0.35em; color: var(--text); }

/* Ảnh */
html body article.wrap img { border-radius: var(--radius) !important; }
html body article.wrap figure img { border: 1px solid var(--line); }
html body article.wrap figcaption { font-size: var(--fs-sm); color: var(--muted); }

/* CTA cuối bài */
html body article.wrap .cta { position: relative; overflow: hidden; background: var(--ink); border: 1px solid rgba(198, 161, 91, 0.35); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 48px); text-align: center; color: var(--text-inv); }
html body article.wrap .cta::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 70% at 50% 0%, rgba(198, 161, 91, 0.16), transparent 65%); }
html body article.wrap .cta > * { position: relative; }
html body article.wrap .cta b { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h4); color: var(--text-inv); }
html body article.wrap .cta p { color: var(--text-inv-2); font-size: var(--fs-sm); }
html body article.wrap .cta a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--brass); color: var(--ink); border: 1px solid var(--brass);
  font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  transition: background 0.3s var(--ease);
}
html body article.wrap .cta a:hover { background: var(--brass-2); border-color: var(--brass-2); }

/* Nguồn / bài kế */
html body article.wrap .src { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em; color: var(--muted); border-top: 1px solid var(--line); }
html body article.wrap .src a { color: var(--text-2); }
html body article.wrap .next { border-radius: var(--radius); }

/* 4. Góc chia sẻ — thẻ chuyên mục, mục trống, ghi chú (thêm 18/10/2026) */
.tt-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html body .tt-cat {
  display: flex; flex-direction: column; gap: 10px; padding: 26px 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--white); color: var(--text); text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
html body .tt-cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--brass); }
.tt-cat__n { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.14em; color: var(--brass-3); }
html body .tt-cat__t { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h4); line-height: 1.25; color: var(--text); }
html body .tt-cat__d { margin: 0; font-size: var(--fs-sm); line-height: 1.65; color: var(--text-2); flex: 1; }
.tt-cat__c { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-3); }
.tt-cat__c svg { width: 12px; height: 12px; }
.tt-empty { padding: clamp(28px, 4vw, 44px); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--white); }
html body .tt-empty__t { margin: 0 0 10px; font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; color: var(--text); }
html body .tt-empty p { margin: 0; color: var(--text-2); }
html body .tt-empty .tt-group { margin-bottom: 14px; color: var(--brass-3); }
html body .tt-empty__links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 22px !important; }
.tt-empty__links a { color: var(--text); text-decoration: none; }
html body .tt-note { margin: 28px 0 0; padding: 16px 20px; border-left: 2px solid var(--brass); background: var(--paper-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--fs-sm); color: var(--text-2); }
.tt-note a { color: var(--text); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; }
.tt-list .mt-5 { margin-top: 40px; }
.tt-list .link-arrow { color: var(--text); text-decoration: none; }
@media (max-width: 720px) { .tt-cats { grid-template-columns: minmax(0, 1fr); } }
