/*
Theme Name: TechPulse
Theme URI: https://example.com/techpulse
Author: TechPulse
Author URI: https://example.com
Description: Theme tin tức công nghệ chuyên nghiệp — trang chủ tạp chí với khối tin nổi bật (featured hero) và thanh tin nóng, mục lục bài viết tự động, nút chia sẻ mạng xã hội, đếm lượt xem + widget "Đang hot", đăng ký newsletter, thanh đọc tiến độ, structured data JSON-LD + Open Graph/Twitter Card, dark mode và AJAX Load More.
Version: 1.4.1
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techpulse
Tags: news, technology, blog, magazine, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Palette — light */
  --tp-bg:          #ffffff;
  --tp-bg-soft:     #f6f6f4;
  --tp-bg-sunken:   #efeeec;
  --tp-surface:     #ffffff;
  --tp-ink:         #0c0c0d;
  --tp-ink-soft:    #3a3a3e;
  --tp-ink-mute:    #6c6c72;
  --tp-line:        #e6e5e1;
  --tp-line-strong: #d6d5d0;
  --tp-accent:      #155bd6;   /* xanh dương */
  --tp-accent-ink:  #ffffff;
  --tp-accent-soft: #e9f0fd;
  --tp-link:        #1450c4;

  /* Type */
  --tp-font-display: "Bricolage Grotesque", "Sora", Georgia, serif;
  --tp-font-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tp-font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --tp-maxw: 1240px;
  --tp-gap: 28px;
  --tp-radius: 4px;
  --tp-radius-lg: 8px;
  --tp-shadow: 0 1px 2px rgba(12,12,13,.05), 0 8px 24px -16px rgba(12,12,13,.25);
  --tp-shadow-hover: 0 2px 4px rgba(12,12,13,.06), 0 18px 40px -20px rgba(12,12,13,.35);

  /* Motion */
  --tp-ease: cubic-bezier(.2,.7,.2,1);
}

[data-theme="dark"] {
  --tp-bg:          #0c0d0f;
  --tp-bg-soft:     #131417;
  --tp-bg-sunken:   #0a0b0d;
  --tp-surface:     #16181c;
  --tp-ink:         #f4f4f2;
  --tp-ink-soft:    #c7c8c9;
  --tp-ink-mute:    #8b8d92;
  --tp-line:        #26282d;
  --tp-line-strong: #34373d;
  --tp-accent:      #5b95ff;
  --tp-accent-ink:  #0c0d0f;
  --tp-accent-soft: #14223d;
  --tp-link:        #82b1ff;
  --tp-shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px -16px rgba(0,0,0,.7);
  --tp-shadow-hover: 0 2px 4px rgba(0,0,0,.6), 0 22px 48px -20px rgba(0,0,0,.8);
}

/* ============================================================
   2. RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--tp-bg);
  color: var(--tp-ink);
  font-family: var(--tp-font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s var(--tp-ease), color .3s var(--tp-ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tp-link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1,h2,h3,h4,h5 {
  font-family: var(--tp-font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--tp-ink);
  margin: 0 0 .5em;
}
p { margin: 0 0 1.2em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }

.tp-container { max-width: var(--tp-maxw); margin: 0 auto; padding: 0 24px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 1000;
  background: var(--tp-ink); color: var(--tp-bg); padding: 10px 16px; border-radius: var(--tp-radius);
}
.skip-link:focus { left: 8px; }

/* ============================================================
   3. HEADER
   ============================================================ */
.tp-topbar {
  border-bottom: 1px solid var(--tp-line);
  background: var(--tp-surface);
  font-family: var(--tp-font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--tp-ink-mute);
}
.tp-topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.tp-topbar .tp-date { text-transform: uppercase; }

.tp-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--tp-bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--tp-line);
}
.tp-header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.tp-brand { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; }
.tp-brand .tp-logo {
  font-family: var(--tp-font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.03em;
  color: var(--tp-ink);
  text-decoration: none;
}
.tp-brand .tp-logo b { color: var(--tp-accent); }
.tp-brand .tp-tagline { font-size: 12px; color: var(--tp-ink-mute); font-family: var(--tp-font-mono); }

.tp-nav { margin-left: auto; }
.tp-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.tp-nav a {
  display: block; padding: 10px 14px; color: var(--tp-ink-soft);
  font-weight: 600; font-size: 15px; border-radius: var(--tp-radius);
  text-decoration: none; transition: background .15s, color .15s;
}
.tp-nav a:hover, .tp-nav .current-menu-item > a { background: var(--tp-bg-soft); color: var(--tp-ink); }
.tp-nav .current-menu-item > a { box-shadow: inset 0 -2px 0 var(--tp-accent); }

.tp-header-tools { display: flex; align-items: center; gap: 8px; }
.tp-icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  color: var(--tp-ink-soft); cursor: pointer; transition: all .15s;
}
.tp-icon-btn:hover { border-color: var(--tp-line-strong); color: var(--tp-ink); background: var(--tp-bg-soft); }
.tp-icon-btn svg { width: 18px; height: 18px; }

.tp-menu-toggle { display: none; }

/* Search drawer */
.tp-search-drawer {
  display: none; border-bottom: 1px solid var(--tp-line); background: var(--tp-surface);
}
.tp-search-drawer.open { display: block; }
.tp-search-drawer form { display: flex; gap: 10px; padding: 20px 0; }
.tp-search-drawer input[type="search"] {
  flex: 1; border: 1px solid var(--tp-line-strong); background: var(--tp-bg);
  color: var(--tp-ink); padding: 14px 16px; border-radius: var(--tp-radius); font-size: 17px;
}
.tp-search-drawer button {
  background: var(--tp-accent); color: var(--tp-accent-ink); border: 0; padding: 0 24px;
  border-radius: var(--tp-radius); font-weight: 700; cursor: pointer;
}

/* ============================================================
   4. LAYOUT
   ============================================================ */
.tp-main { padding: 40px 0 64px; }
.tp-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 48px; }
.tp-layout.no-sidebar { grid-template-columns: minmax(0,1fr); }

/* ============================================================
   5. SECTION HEADINGS (category blocks)
   ============================================================ */
.tp-section { margin-bottom: 56px; }
.tp-section-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
  border-bottom: 2px solid var(--tp-ink); padding-bottom: 10px;
}
.tp-section-head h2 {
  margin: 0; font-size: 22px; text-transform: uppercase; letter-spacing: -.01em;
}
.tp-section-head .tp-kicker {
  display: inline-block; background: var(--tp-accent); color: var(--tp-accent-ink);
  font-family: var(--tp-font-mono); font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 3px; letter-spacing: .06em; text-transform: uppercase;
}
.tp-section-head .tp-more {
  margin-left: auto; font-size: 13px; font-weight: 600; color: var(--tp-ink-mute);
  font-family: var(--tp-font-mono); text-decoration: none;
}
.tp-section-head .tp-more:hover { color: var(--tp-accent); }

/* ============================================================
   6. POST GRID + CARD
   ============================================================ */
.tp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tp-gap); }
.tp-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.tp-card { display: flex; flex-direction: column; min-width: 0; }
.tp-card-media {
  position: relative; display: block; overflow: hidden; border-radius: var(--tp-radius-lg);
  aspect-ratio: 16/10; background: var(--tp-bg-sunken); margin-bottom: 14px;
}
.tp-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--tp-ease);
}
.tp-card:hover .tp-card-media img { transform: scale(1.045); }
.tp-noimg {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, var(--tp-bg-soft) 0 12px, var(--tp-bg-sunken) 12px 24px);
}
.tp-noimg::after {
  content: ""; position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--tp-accent); width: 36px; height: 36px; margin: auto; border-radius: 50%;
  opacity: .9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v14H4z' fill='none'/%3E%3Cpath d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14l4-4 3 3 5-5 4 4z'/%3E%3C/svg%3E") center/22px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14l4-4 3 3 5-5 4 4z'/%3E%3C/svg%3E") center/22px no-repeat;
}
.tp-pagelinks { font-family: var(--tp-font-mono); font-size: 14px; margin: 24px auto 0; max-width: 720px; }
.tp-pagelinks a, .tp-pagelinks > span { display: inline-block; padding: 4px 10px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); margin-right: 4px; }
.tp-card-cat {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  background: var(--tp-ink); color: var(--tp-bg);
  font-family: var(--tp-font-mono); font-size: 11px; font-weight: 600;
  padding: 5px 9px; border-radius: 3px; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none;
}
.tp-card-cat:hover { background: var(--tp-accent); color: var(--tp-accent-ink); text-decoration: none; }
.tp-card-title {
  font-family: var(--tp-font-display); font-weight: 700; font-size: 19px; line-height: 1.22;
  letter-spacing: -.015em; margin: 0 0 8px;
}
.tp-card-title a { color: var(--tp-ink); text-decoration: none; background-image: linear-gradient(var(--tp-accent),var(--tp-accent)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s var(--tp-ease); }
.tp-card-title a:hover { background-size: 100% 2px; }
.tp-card-excerpt { color: var(--tp-ink-soft); font-size: 15px; line-height: 1.6; margin: 0 0 12px; }
.tp-card-meta {
  display: flex; align-items: center; gap: 8px; margin-top: auto;
  font-size: 13px; color: var(--tp-ink-mute); font-family: var(--tp-font-mono);
}
.tp-card-meta a { color: var(--tp-ink-soft); text-decoration: none; font-weight: 600; }
.tp-card-meta a:hover { color: var(--tp-accent); }
.tp-card-meta .tp-dot { width: 3px; height: 3px; background: var(--tp-line-strong); border-radius: 50%; }

/* Lead / featured card variant */
.tp-card.is-lead { grid-column: span 2; grid-row: span 2; height: 100%; }
/* Ảnh lead giãn lấp đầy chiều cao 2 hàng -> không còn khoảng trống giữa bài */
.tp-card.is-lead .tp-card-media { aspect-ratio: auto; flex: 1 1 auto; min-height: 360px; }
.tp-card.is-lead .tp-card-title { font-size: 32px; }
.tp-card.is-lead .tp-card-excerpt { font-size: 17px; }

/* Compact list (sidebar / author) */
.tp-list { display: flex; flex-direction: column; gap: 18px; }
.tp-list-item { display: flex; gap: 14px; }
.tp-list-item .tp-thumb {
  flex: 0 0 84px; aspect-ratio: 1; border-radius: var(--tp-radius); overflow: hidden;
  background: var(--tp-bg-sunken);
}
.tp-list-item .tp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tp-list-item h4 { font-size: 15px; line-height: 1.3; margin: 0 0 6px; }
.tp-list-item h4 a { color: var(--tp-ink); text-decoration: none; }
.tp-list-item h4 a:hover { color: var(--tp-accent); }
.tp-list-item .tp-list-meta { font-size: 12px; color: var(--tp-ink-mute); font-family: var(--tp-font-mono); }
.tp-list-item .tp-rank { font-family: var(--tp-font-display); font-size: 26px; color: var(--tp-line-strong); font-weight: 800; line-height: 1; }

/* ============================================================
   7. LOAD MORE
   ============================================================ */
.tp-loadmore-wrap { display: flex; justify-content: center; margin-top: 40px; }
.tp-loadmore {
  font-family: var(--tp-font-mono); font-weight: 600; font-size: 14px; letter-spacing: .03em;
  background: var(--tp-surface); color: var(--tp-ink); border: 1px solid var(--tp-line-strong);
  padding: 14px 34px; border-radius: 100px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; transition: all .18s var(--tp-ease);
}
.tp-loadmore:hover:not(:disabled) { background: var(--tp-ink); color: var(--tp-bg); border-color: var(--tp-ink); }
.tp-loadmore:disabled { opacity: .55; cursor: default; }
.tp-loadmore .tp-spinner {
  width: 15px; height: 15px; border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; display: none; animation: tp-spin .7s linear infinite;
}
.tp-loadmore.loading .tp-spinner { display: inline-block; }
.tp-loadmore.loading .tp-label { opacity: .6; }
@keyframes tp-spin { to { transform: rotate(360deg); } }

/* staggered reveal for appended items */
.tp-card.tp-reveal { animation: tp-fade .5s var(--tp-ease) both; }
@keyframes tp-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============================================================
   8. SIDEBAR
   ============================================================ */
.tp-sidebar { position: sticky; top: 96px; align-self: start; }
.tp-widget { margin-bottom: 40px; }
.tp-widget-title {
  font-size: 14px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--tp-font-mono);
  color: var(--tp-ink-mute); margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--tp-line);
}
.tp-widget ul { list-style: none; margin: 0; padding: 0; }
.tp-widget ul li { padding: 8px 0; border-bottom: 1px solid var(--tp-line); }
.tp-widget ul li a { color: var(--tp-ink-soft); text-decoration: none; }
.tp-widget ul li a:hover { color: var(--tp-accent); }

/* ============================================================
   9. SINGLE POST
   ============================================================ */
.tp-article-head { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.tp-article-head .tp-eyebrow { margin-bottom: 18px; }
.tp-article-head .tp-eyebrow a {
  background: var(--tp-accent); color: var(--tp-accent-ink); font-family: var(--tp-font-mono);
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 3px; text-transform: uppercase;
  letter-spacing: .05em; text-decoration: none;
}
.tp-article-head h1 { font-size: clamp(30px, 5vw, 50px); margin: 0 0 18px; }
.tp-article-head .tp-dek { font-size: 20px; color: var(--tp-ink-soft); line-height: 1.5; }
.tp-article-byline {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin-top: 22px; font-size: 14px; color: var(--tp-ink-mute); font-family: var(--tp-font-mono);
}
.tp-article-byline img { width: 34px; height: 34px; border-radius: 50%; }
.tp-article-byline a { color: var(--tp-ink); font-weight: 600; text-decoration: none; }
.tp-article-byline a:hover { color: var(--tp-accent); }

.tp-hero-img { margin: 0 0 40px; }
.tp-hero-img img { width: 100%; border-radius: var(--tp-radius-lg); }
.tp-hero-img figcaption { font-size: 13px; color: var(--tp-ink-mute); margin-top: 10px; text-align: center; font-family: var(--tp-font-mono); }

.tp-content { max-width: 720px; margin: 0 auto; font-size: 19px; line-height: 1.75; }
.tp-content > * { margin-left: auto; margin-right: auto; }
.tp-content h2 { font-size: 28px; margin: 1.6em 0 .5em; }
.tp-content h3 { font-size: 22px; margin: 1.4em 0 .5em; }
.tp-content a { color: var(--tp-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tp-content img { border-radius: var(--tp-radius-lg); margin: 1.6em auto; }
.tp-content blockquote {
  border-left: 3px solid var(--tp-accent); margin: 1.6em 0; padding: 4px 0 4px 24px;
  font-family: var(--tp-font-display); font-size: 24px; line-height: 1.4; color: var(--tp-ink);
}
.tp-content pre {
  background: var(--tp-bg-sunken); border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  padding: 18px; overflow-x: auto; font-family: var(--tp-font-mono); font-size: 14px;
}
.tp-content code { font-family: var(--tp-font-mono); font-size: .9em; background: var(--tp-bg-soft); padding: 2px 6px; border-radius: 3px; }
.tp-content pre code { background: none; padding: 0; }

.tp-tags { max-width: 720px; margin: 40px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tp-tags a {
  font-family: var(--tp-font-mono); font-size: 13px; color: var(--tp-ink-soft);
  border: 1px solid var(--tp-line-strong); padding: 6px 12px; border-radius: 100px; text-decoration: none;
}
.tp-tags a:hover { border-color: var(--tp-accent); color: var(--tp-accent); }
.tp-tags a::before { content: "#"; color: var(--tp-ink-mute); }

/* ============================================================
   10. AUTHOR BOX + AUTHOR PAGE
   ============================================================ */
.tp-author-box {
  max-width: 720px; margin: 48px auto 0; padding: 28px;
  background: var(--tp-bg-soft); border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg);
  display: flex; gap: 22px;
}
.tp-author-box .tp-avatar { flex: 0 0 84px; }
.tp-author-box .tp-avatar img { width: 84px; height: 84px; border-radius: 50%; }
.tp-author-box .tp-au-label { font-family: var(--tp-font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--tp-ink-mute); margin-bottom: 4px; }
.tp-author-box .tp-au-name { font-size: 22px; margin: 0 0 6px; }
.tp-author-box .tp-au-name a { color: var(--tp-ink); text-decoration: none; }
.tp-author-box .tp-au-name a:hover { color: var(--tp-accent); }
.tp-author-box .tp-au-bio { font-size: 15px; color: var(--tp-ink-soft); margin: 0 0 12px; }
.tp-author-box .tp-au-social { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-author-box .tp-au-social a {
  font-family: var(--tp-font-mono); font-size: 12px; color: var(--tp-ink-soft);
  border: 1px solid var(--tp-line-strong); padding: 4px 10px; border-radius: 100px; text-decoration: none;
}
.tp-author-box .tp-au-social a:hover { border-color: var(--tp-accent); color: var(--tp-accent); }

.tp-author-hero {
  background: var(--tp-bg-soft); border-bottom: 1px solid var(--tp-line);
  padding: 56px 0;
}
.tp-author-hero-inner { display: flex; gap: 28px; align-items: center; max-width: 860px; }
.tp-author-hero img { width: 110px; height: 110px; border-radius: 50%; flex-shrink: 0; }
.tp-author-hero h1 { font-size: 40px; margin: 0 0 8px; }
.tp-author-hero .tp-au-bio { font-size: 17px; color: var(--tp-ink-soft); max-width: 60ch; margin: 0 0 14px; }
.tp-author-hero .tp-au-stat { font-family: var(--tp-font-mono); font-size: 13px; color: var(--tp-ink-mute); }

/* ============================================================
   11. RELATED POSTS
   ============================================================ */
.tp-related { border-top: 1px solid var(--tp-line); margin-top: 64px; padding-top: 40px; }

/* ============================================================
   12. PAGINATION (fallback / archive non-ajax) + breadcrumb
   ============================================================ */
.tp-breadcrumb { font-family: var(--tp-font-mono); font-size: 13px; color: var(--tp-ink-mute); margin-bottom: 24px; }
.tp-breadcrumb a { color: var(--tp-ink-soft); text-decoration: none; }
.tp-breadcrumb a:hover { color: var(--tp-accent); }
.tp-breadcrumb .sep { margin: 0 8px; }

.tp-archive-head { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 2px solid var(--tp-ink); }
.tp-archive-head .tp-kicker { display: inline-block; background: var(--tp-accent); color: var(--tp-accent-ink); font-family: var(--tp-font-mono); font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 3px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; }
.tp-archive-head h1 { font-size: clamp(28px,4vw,44px); margin: 0 0 8px; }
.tp-archive-head p { color: var(--tp-ink-soft); margin: 0; max-width: 70ch; }

/* ============================================================
   13. FOOTER
   ============================================================ */
.tp-footer { background: var(--tp-bg-sunken); border-top: 1px solid var(--tp-line); margin-top: 40px; }
.tp-footer-top { padding: 56px 0; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.tp-footer .tp-logo { font-family: var(--tp-font-display); font-weight: 800; font-size: 26px; color: var(--tp-ink); }
.tp-footer .tp-logo b { color: var(--tp-accent); }
.tp-footer p { color: var(--tp-ink-mute); font-size: 14px; max-width: 38ch; }
.tp-footer h4 { font-family: var(--tp-font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--tp-ink-mute); margin: 0 0 16px; }
.tp-footer ul { list-style: none; margin: 0; padding: 0; }
.tp-footer ul li { margin-bottom: 10px; }
.tp-footer ul li a { color: var(--tp-ink-soft); text-decoration: none; font-size: 14px; }
.tp-footer ul li a:hover { color: var(--tp-accent); }
.tp-footer-bottom { border-top: 1px solid var(--tp-line); padding: 22px 0; display: flex; justify-content: space-between; font-family: var(--tp-font-mono); font-size: 12px; color: var(--tp-ink-mute); }

/* ============================================================
   14. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .tp-layout { grid-template-columns: 1fr; gap: 40px; }
  .tp-sidebar { position: static; }
  .tp-grid { grid-template-columns: repeat(2, 1fr); }
  .tp-card.is-lead { grid-column: span 2; grid-row: auto; }
  .tp-card.is-lead .tp-card-media { aspect-ratio: 16/9; flex: none; min-height: 0; }
  .tp-card.is-lead .tp-card-title { font-size: 26px; }
  .tp-footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .tp-header-inner { gap: 14px; }
  .tp-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--tp-surface); border-bottom: 1px solid var(--tp-line); padding: 12px; }
  .tp-nav.open { display: block; }
  .tp-nav ul { flex-direction: column; gap: 2px; }
  .tp-menu-toggle { display: grid; }
  .tp-grid, .tp-grid.cols-2 { grid-template-columns: 1fr; }
  .tp-card.is-lead { grid-column: auto; }
  .tp-card.is-lead .tp-card-title { font-size: 24px; }
  .tp-content, .tp-article-head, .tp-author-box, .tp-tags, .tp-related .tp-container { font-size: 17px; }
  .tp-author-box { flex-direction: column; }
  .tp-author-hero-inner { flex-direction: column; text-align: center; }
  .tp-footer-top { grid-template-columns: 1fr; gap: 28px; }
  .tp-footer-bottom { flex-direction: column; gap: 8px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   BÌNH LUẬN — giao diện chuyên nghiệp (dùng design token, tự hỗ trợ dark mode)
   ============================================================ */
.tp-comments-area { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--tp-line); }
.tp-comments__title {
  font-family: var(--tp-font-display); font-weight: 700; font-size: 22px;
  color: var(--tp-ink); margin: 0 0 24px; letter-spacing: -.01em;
}

.tp-commentlist { list-style: none; margin: 0 0 8px; padding: 0; }
.tp-commentlist .children { list-style: none; margin: 0; padding-left: 28px; border-left: 2px solid var(--tp-line); }
.tp-comment { margin: 0; }

.tp-comment__body { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--tp-line); }
.tp-comment .children .tp-comment__body { padding-left: 12px; }
.tp-comment__avatar img { width: 48px; height: 48px; border-radius: 50%; display: block; }
.tp-comment__main { flex: 1 1 auto; min-width: 0; }
.tp-comment__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.tp-comment__author { font-weight: 700; color: var(--tp-ink); font-size: 15px; }
.tp-comment__date { font-size: 12.5px; color: var(--tp-ink-mute); }
.tp-comment__date::first-letter { text-transform: uppercase; }
.tp-comment__pending {
  font-size: 12.5px; color: var(--tp-accent); background: var(--tp-accent-soft);
  padding: 4px 10px; border-radius: var(--tp-radius); display: inline-block; margin: 0 0 8px;
}
.tp-comment__content { font-size: 15px; line-height: 1.7; color: var(--tp-ink-soft); }
.tp-comment__content p { margin: 0 0 10px; }
.tp-comment__content p:last-child { margin-bottom: 0; }
.tp-comment__actions { margin-top: 8px; font-size: 13px; display: flex; gap: 14px; }
.tp-comment__actions a { color: var(--tp-accent); font-weight: 600; text-decoration: none; }
.tp-comment__actions a:hover { text-decoration: underline; }
.tp-comment__edit a { color: var(--tp-ink-mute); font-weight: 500; }
.tp-comment.bypostauthor > .tp-comment__body { background: var(--tp-bg-soft); border-radius: var(--tp-radius-lg); padding-inline: 14px; }

/* Form bình luận */
.comment-respond { margin-top: 36px; padding: 26px; background: var(--tp-bg-soft); border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg); }
.comment-reply-title { font-family: var(--tp-font-display); font-weight: 700; font-size: 19px; color: var(--tp-ink); margin: 0 0 18px; }
.comment-reply-title small { margin-left: 10px; font-weight: 400; font-size: 14px; }
.comment-reply-title small a { color: var(--tp-ink-mute); }
.tp-commentform__notes { font-size: 13px; color: var(--tp-ink-mute); margin: 0 0 18px; }
.tp-commentform__field { margin: 0 0 16px; }
.tp-commentform__field label { display: block; font-size: 13px; font-weight: 600; color: var(--tp-ink); margin-bottom: 6px; }
.tp-commentform__field input,
.tp-commentform__field textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 14.5px;
  color: var(--tp-ink); background: var(--tp-surface);
  border: 1px solid var(--tp-line-strong); border-radius: var(--tp-radius);
  transition: border-color .15s var(--tp-ease), box-shadow .15s var(--tp-ease);
}
.tp-commentform__field input:focus,
.tp-commentform__field textarea:focus {
  outline: none; border-color: var(--tp-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tp-accent) 18%, transparent);
}
.tp-commentform__field textarea { resize: vertical; min-height: 130px; }
.required { color: var(--tp-accent); }

.tp-commentform__submit {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; font-family: var(--tp-font-body); font-size: 15px; font-weight: 700;
  color: var(--tp-accent-ink); background: var(--tp-accent); border: 1px solid var(--tp-accent);
  border-radius: var(--tp-radius); cursor: pointer; transition: background .15s var(--tp-ease), transform .12s var(--tp-ease);
}
.tp-commentform__submit:hover { background: var(--tp-ink); border-color: var(--tp-ink); color: var(--tp-bg); }
.tp-commentform__submit:active { transform: translateY(1px); }
.tp-comments__closed { font-size: 13.5px; color: var(--tp-ink-mute); font-style: italic; margin: 16px 0 0; }

/* Tên / Email xếp 2 cột trên màn rộng */
@media (min-width: 600px) {
  .comment-form-author, .comment-form-email { display: inline-block; width: calc(50% - 8px); vertical-align: top; }
  .comment-form-author { margin-right: 14px; }
}

/* ============================================================
   ★ TÍNH NĂNG MỚI 1.2.0
   Featured hero · Ticker · TOC · Share · Newsletter · Progress · Back-to-top
   ============================================================ */

/* --- Category badge: tô màu theo chuyên mục (ghi đè mặc định) --- */
.tp-card-cat { background: var(--cat, var(--tp-ink)); color: #fff; }
.tp-card-cat:hover { filter: brightness(1.08); background: var(--cat, var(--tp-accent)); color: #fff; }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.tp-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: transparent; pointer-events: none;
}
.tp-progress-fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--tp-accent), color-mix(in srgb, var(--tp-accent) 55%, #fff));
  transition: width .12s linear;
}

/* ============================================================
   TRENDING TICKER
   ============================================================ */
.tp-ticker {
  background: var(--tp-ink); color: var(--tp-bg);
  border-bottom: 1px solid var(--tp-line);
  overflow: hidden;
}
.tp-ticker-inner { display: flex; align-items: center; gap: 18px; height: 46px; }
.tp-ticker-tag {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  font-family: var(--tp-font-mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  background: var(--tp-accent); color: var(--tp-accent-ink);
  padding: 5px 11px; border-radius: 100px;
}
.tp-ticker-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: tp-pulse 1.4s var(--tp-ease) infinite; }
@keyframes tp-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.tp-ticker-track { overflow: hidden; flex: 1 1 auto; min-width: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); }
.tp-ticker-list { display: inline-flex; gap: 0; margin: 0; padding: 0; list-style: none; white-space: nowrap; will-change: transform; animation: tp-ticker-scroll 38s linear infinite; }
.tp-ticker:hover .tp-ticker-list { animation-play-state: paused; }
.tp-ticker-list li { display: inline-flex; align-items: center; }
.tp-ticker-list li::before { content: "•"; color: var(--tp-ink-mute); margin: 0 20px; }
.tp-ticker-list li:first-child::before { display: none; }
.tp-ticker-list a { color: var(--tp-bg); font-size: 13.5px; font-weight: 500; text-decoration: none; opacity: .92; }
.tp-ticker-list a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
@keyframes tp-ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   FEATURED HERO
   ============================================================ */
.tp-hero { padding: 36px 0 12px; }
.tp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 34px; }
.tp-hero-lead { display: flex; flex-direction: column; }
.tp-hero-lead .tp-hero-media {
  position: relative; display: block; overflow: hidden; border-radius: var(--tp-radius-lg);
  aspect-ratio: 16/9; background: var(--tp-bg-sunken); margin-bottom: 18px;
}
.tp-hero-lead .tp-hero-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--tp-ease); }
.tp-hero-lead:hover .tp-hero-media img { transform: scale(1.04); }
.tp-hero-cat {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  background: var(--cat, var(--tp-accent)); color: #fff;
  font-family: var(--tp-font-mono); font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 4px; letter-spacing: .04em; text-transform: uppercase;
}
.tp-hero-title { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; margin: 0 0 12px; }
.tp-hero-title a { color: var(--tp-ink); text-decoration: none; }
.tp-hero-title a:hover { color: var(--tp-accent); }
.tp-hero-excerpt { font-size: 17px; color: var(--tp-ink-soft); line-height: 1.55; margin: 0 0 14px; }

.tp-hero-side { display: flex; flex-direction: column; gap: 20px; }
.tp-hero-item { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 15px; align-items: start; }
.tp-hero-item:not(:last-child) { padding-bottom: 20px; border-bottom: 1px solid var(--tp-line); }
.tp-hero-item-media { display: block; aspect-ratio: 4/3; border-radius: var(--tp-radius); overflow: hidden; background: var(--tp-bg-sunken); }
.tp-hero-item-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--tp-ease); }
.tp-hero-item:hover .tp-hero-item-media img { transform: scale(1.06); }
.tp-hero-item-cat { font-family: var(--tp-font-mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--cat, var(--tp-accent)); text-decoration: none; }
.tp-hero-item-cat:hover { text-decoration: underline; }
.tp-hero-item-title { font-size: 16px; line-height: 1.28; margin: 5px 0 6px; }
.tp-hero-item-title a { color: var(--tp-ink); text-decoration: none; background-image: linear-gradient(var(--tp-accent),var(--tp-accent)); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s var(--tp-ease); }
.tp-hero-item-title a:hover { background-size: 100% 1.5px; }

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.tp-content h2, .tp-content h3 { scroll-margin-top: 92px; }
.tp-toc {
  max-width: 720px; margin: 0 auto 30px;
  border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg);
  background: var(--tp-bg-soft); overflow: hidden;
}
.tp-toc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: 0; cursor: pointer; padding: 15px 20px;
  font-family: var(--tp-font-display); font-weight: 700; font-size: 15px; color: var(--tp-ink);
}
.tp-toc-label { display: inline-flex; align-items: center; gap: 9px; }
.tp-toc-label::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--tp-accent); }
.tp-toc-chevron { width: 18px; height: 18px; color: var(--tp-ink-mute); transition: transform .25s var(--tp-ease); }
.tp-toc-head[aria-expanded="false"] .tp-toc-chevron { transform: rotate(-90deg); }
.tp-toc-list {
  list-style: none; margin: 0; padding: 4px 20px 16px; counter-reset: toc;
  max-height: 600px; overflow: hidden; transition: max-height .3s var(--tp-ease), opacity .2s, padding .3s;
}
.tp-toc-list[hidden] { display: block; max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
.tp-toc-list li { margin: 0; }
.tp-toc-list a {
  display: block; padding: 6px 0; font-size: 14.5px; line-height: 1.4;
  color: var(--tp-ink-soft); text-decoration: none; border-left: 2px solid transparent; padding-left: 12px;
  transition: color .15s, border-color .15s;
}
.tp-toc-list a:hover { color: var(--tp-accent); }
.tp-toc-l3 a { padding-left: 28px; font-size: 13.5px; color: var(--tp-ink-mute); }
.tp-toc-list a.is-active { color: var(--tp-accent); border-left-color: var(--tp-accent); font-weight: 600; }

/* ============================================================
   ARTICLE BODY LAYOUT (share rail + main)
   ============================================================ */
.tp-article-body {
  max-width: 868px; margin: 0 auto;
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 28px; align-items: start;
}
.tp-article-main { min-width: 0; }
.tp-article-main .tp-content,
.tp-article-main .tp-tags,
.tp-article-main .tp-author-box,
.tp-article-main .tp-toc,
.tp-article-main .tp-newsletter { margin-left: auto; margin-right: auto; }

/* ============================================================
   SOCIAL SHARE
   ============================================================ */
.tp-share-rail { position: sticky; top: 96px; }
.tp-share { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.tp-share-label {
  font-family: var(--tp-font-mono); font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--tp-ink-mute); margin-bottom: 2px; writing-mode: vertical-rl; display: none;
}
.tp-share-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--tp-line); background: var(--tp-surface); color: var(--tp-ink-soft);
  transition: transform .15s var(--tp-ease), background .15s, color .15s, border-color .15s;
}
.tp-share-btn svg { width: 17px; height: 17px; }
.tp-share-btn:hover { transform: translateY(-2px); color: #fff; }
.tp-share-facebook:hover { background: #1877f2; border-color: #1877f2; }
.tp-share-twitter:hover  { background: #0f1419; border-color: #0f1419; }
.tp-share-linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.tp-share-copy:hover { background: var(--tp-accent); border-color: var(--tp-accent); }
.tp-copy-toast {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px);
  background: var(--tp-ink); color: var(--tp-bg); font-family: var(--tp-font-mono); font-size: 11px;
  padding: 5px 10px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.tp-share-copy.copied .tp-copy-toast { opacity: 1; transform: translateX(-50%) translateY(0); }

.tp-share-inline { display: none; max-width: 720px; margin: 36px auto 0; padding-top: 24px; border-top: 1px solid var(--tp-line); }
.tp-share-inline .tp-share { flex-direction: row; align-items: center; }
.tp-share-inline .tp-share-label { writing-mode: horizontal-tb; display: inline-block; margin: 0 4px 0 0; }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.tp-newsletter {
  position: relative; overflow: hidden;
  border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tp-accent) 12%, transparent), transparent 60%),
    var(--tp-bg-soft);
}
.tp-newsletter::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tp-accent); }
.tp-newsletter-icon { color: var(--tp-accent); }
.tp-newsletter-icon svg { width: 30px; height: 30px; }
.tp-newsletter-title { font-size: 19px; margin: 0 0 6px; }
.tp-newsletter-desc { font-size: 14px; color: var(--tp-ink-soft); margin: 0 0 16px; line-height: 1.55; }
.tp-newsletter-form { display: flex; gap: 8px; }
.tp-newsletter-form input {
  flex: 1; min-width: 0; padding: 11px 14px; font: inherit; font-size: 14.5px;
  color: var(--tp-ink); background: var(--tp-surface);
  border: 1px solid var(--tp-line-strong); border-radius: var(--tp-radius);
}
.tp-newsletter-form input:focus { outline: none; border-color: var(--tp-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tp-accent) 18%, transparent); }
.tp-newsletter-form button {
  flex-shrink: 0; padding: 11px 20px; font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer;
  color: var(--tp-accent-ink); background: var(--tp-accent); border: 1px solid var(--tp-accent); border-radius: var(--tp-radius);
  transition: background .15s, transform .12s;
}
.tp-newsletter-form button:hover { background: var(--tp-ink); border-color: var(--tp-ink); color: var(--tp-bg); }
.tp-newsletter-form button:active { transform: translateY(1px); }
.tp-newsletter-msg { font-size: 13px; color: var(--tp-accent); margin: 10px 0 0; min-height: 1px; }
.tp-newsletter-msg:empty { margin: 0; }

/* variant: article (full width, icon + body cạnh nhau) */
.tp-newsletter--article { max-width: 720px; margin: 44px auto 0; display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 26px 28px; align-items: start; }
.tp-newsletter--article .tp-newsletter-icon { padding-top: 4px; }

/* variant: sidebar (dọc, gọn) */
.tp-newsletter--sidebar { padding: 22px 20px; }
.tp-newsletter--sidebar .tp-newsletter-icon { margin-bottom: 10px; }
.tp-newsletter--sidebar .tp-newsletter-form { flex-direction: column; }
.tp-newsletter--sidebar .tp-newsletter-form button { width: 100%; }

/* variant: block (mặc định) */
.tp-newsletter--block { padding: 26px 28px; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.tp-totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 55;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: var(--tp-accent); color: var(--tp-accent-ink); border: 0;
  box-shadow: var(--tp-shadow-hover);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s var(--tp-ease), transform .25s var(--tp-ease), visibility .25s;
}
.tp-totop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.tp-totop:hover { background: var(--tp-ink); color: var(--tp-bg); }
.tp-totop svg { width: 22px; height: 22px; }

/* ============================================================
   RESPONSIVE — tính năng mới
   ============================================================ */
@media (max-width: 980px) {
  .tp-hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .tp-hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .tp-hero-item { grid-template-columns: 1fr; }
  .tp-hero-item-media { aspect-ratio: 16/10; }
  .tp-hero-item:not(:last-child) { padding-bottom: 0; border-bottom: 0; }
}
@media (max-width: 860px) {
  /* Bỏ rail dọc, chuyển share xuống cuối bài */
  .tp-article-body { display: block; max-width: 720px; }
  .tp-share-rail { display: none; }
  .tp-share-inline { display: block; }
}
@media (max-width: 680px) {
  .tp-ticker-inner { gap: 12px; }
  .tp-hero-side { grid-template-columns: 1fr; }
  .tp-newsletter--article { grid-template-columns: 1fr; }
  .tp-newsletter--article .tp-newsletter-form { flex-direction: column; }
  .tp-newsletter--article .tp-newsletter-form button { width: 100%; }
  .tp-totop { right: 14px; bottom: 14px; }
}

/* ============================================================
   ★ TÍNH NĂNG 1.3.0 — TRANG CHỦ FULL-WIDTH + LAYOUT ĐA DẠNG
   + SIDEBAR TRONG SINGLE
   ============================================================ */

/* Feed full-width: các section xếp dọc, không sidebar */
.tp-feed { width: 100%; }
.tp-feed .tp-section { margin-bottom: 64px; }
.tp-feed .tp-section:last-child { margin-bottom: 8px; }

/* Tiêu đề chuyên mục: gạch màu nhận diện ở đầu */
.tp-feed .tp-section-head h2 a { color: inherit; text-decoration: none; }
.tp-feed .tp-section-head h2 a:hover { color: var(--cat, var(--tp-accent)); }
.tp-feed .tp-section-head .tp-kicker { background: var(--cat, var(--tp-accent)); color: #fff; }

/* --- LAYOUT "ROW": dải card đều nhau nằm ngang (4 cột) --- */
.tp-grid--row { grid-template-columns: repeat(4, 1fr); }

/* --- LAYOUT "MOSAIC": dùng lưới 3 cột + bài lead 2x2 (đã có .is-lead) --- */
.tp-grid--mosaic { grid-template-columns: repeat(3, 1fr); }

/* --- LAYOUT "LIST": danh sách dọc, mỗi bài là một hàng ảnh + chữ --- */
.tp-catlist {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 26px 40px;
}
.tp-hrow { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 18px; align-items: start; }
.tp-hrow-media {
  display: block; aspect-ratio: 4/3; border-radius: var(--tp-radius);
  overflow: hidden; background: var(--tp-bg-sunken); position: relative;
}
.tp-hrow-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--tp-ease); }
.tp-hrow:hover .tp-hrow-media img { transform: scale(1.06); }
.tp-hrow-media .tp-noimg { position: absolute; inset: 0; background:
  repeating-linear-gradient(135deg, var(--tp-bg-soft) 0 10px, var(--tp-bg-sunken) 10px 20px); }
.tp-hrow-title { font-size: 18px; line-height: 1.28; margin: 0 0 8px; }
.tp-hrow-title a {
  color: var(--tp-ink); text-decoration: none;
  background-image: linear-gradient(var(--cat, var(--tp-accent)), var(--cat, var(--tp-accent)));
  background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .25s var(--tp-ease);
}
.tp-hrow-title a:hover { background-size: 100% 2px; }
.tp-hrow-excerpt { font-size: 14px; color: var(--tp-ink-soft); line-height: 1.55; margin: 0 0 10px; }

/* ============================================================
   SINGLE — bố cục bài viết + sidebar phải
   ============================================================ */
.tp-single-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px;
  align-items: start;
}
.tp-article-col { min-width: 0; }
/* Trong grid này, thân bài lấp đầy cột thay vì tự căn giữa 868px */
.tp-single-grid .tp-article-body { max-width: none; margin: 0; }

.tp-single-aside { position: sticky; top: 96px; align-self: start; }
.tp-single-aside .tp-widget { margin-bottom: 36px; }
.tp-single-aside .tp-widget:last-child { margin-bottom: 0; }

/* Nhãn chuyên mục nhỏ trong widget danh sách (Mới nhất) */
.tp-list-cat {
  display: inline-block; font-family: var(--tp-font-mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px;
  color: var(--cat, var(--tp-accent)); text-decoration: none;
}
.tp-list-cat:hover { text-decoration: underline; }
.tp-single-aside .tp-list-item .tp-thumb,
.tp-sidebar .tp-list-item .tp-thumb {
  flex: 0 0 84px; width: 84px; height: 60px; border-radius: var(--tp-radius);
  overflow: hidden; background: var(--tp-bg-sunken);
}

/* ============================================================
   RESPONSIVE — layout mới
   ============================================================ */
@media (max-width: 1080px) {
  .tp-grid--row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  /* Single: sidebar xuống dưới bài, hết sticky */
  .tp-single-grid { grid-template-columns: 1fr; gap: 8px; }
  .tp-single-aside { position: static; margin-top: 8px; }
  .tp-single-aside .tp-widget { margin-bottom: 28px; }
}
@media (max-width: 860px) {
  .tp-grid--row { grid-template-columns: repeat(2, 1fr); }
  .tp-catlist { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 560px) {
  .tp-grid--row { grid-template-columns: 1fr; }
  .tp-hrow { grid-template-columns: 116px minmax(0, 1fr); gap: 14px; }
  .tp-hrow-title { font-size: 16px; }
  .tp-hrow-excerpt { display: none; }
}

/* --- MOSAIC: co cột theo màn hình (sửa lỗi tràn 3 cột trên mobile) --- */
@media (max-width: 1024px) {
  .tp-grid--mosaic { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .tp-grid--mosaic { grid-template-columns: 1fr; }
  /* Bài lead về dạng card thường, ảnh tỉ lệ chuẩn, tiêu đề full chiều rộng */
  .tp-sec--mosaic .tp-card.is-lead { grid-column: auto; grid-row: auto; height: auto; }
  .tp-sec--mosaic .tp-card.is-lead .tp-card-media { aspect-ratio: 16/9; flex: none; min-height: 0; }
  .tp-sec--mosaic .tp-card.is-lead .tp-card-title { font-size: 22px; }
}

/* --- SECTION HEAD: gọn gàng, không vỡ trên mobile --- */
@media (max-width: 680px) {
  .tp-section-head { flex-wrap: wrap; gap: 8px 12px; padding-bottom: 8px; margin-bottom: 18px; }
  .tp-section-head h2 { font-size: 19px; }
  .tp-section-head .tp-kicker { font-size: 10px; padding: 3px 7px; }
  .tp-section-head .tp-more { margin-left: auto; font-size: 12px; }
}

/* Nội dung soạn tay trong trang chủ (banner/intro phía trên các khối) */
.tp-home-intro { margin: 8px 0 40px; }
.tp-home-intro:empty { display: none; }
.tp-home-intro > *:first-child { margin-top: 0; }
.tp-home-intro img { max-width: 100%; height: auto; border-radius: var(--tp-radius-lg); }
