/* ==========================================================================
   AutoNewsPro — site.css
   Template "reader" (mặc định): giao diện đọc tin kiểu báo Anh–Mỹ.
   Sáng / tối qua [data-theme]. Template: reader (mặc định) | newsprint | modern | midnight qua [data-template].
   Ưu tiên điện thoại (mobile-first) → PC (≥1024px) → TV (≥1920px).
   ========================================================================== */

/* ---------- Biến: Reader · Sáng ---------- */
:root,
[data-theme="light"] {
    --bg: #ffffff;
    --surface: #f6f7f9;
    --text: #1d1f23;
    --text-2: #4a4f57;
    --muted: #6b717b;
    --line: #e3e6ea;
    --brand: #0f2a4a;          /* navy */
    --accent: #c8102e;         /* đỏ báo Mỹ */
    --link: #0b4f8a;
    --link-hover: #c8102e;
    --btn-bg: #c8102e;
    --btn-text: #ffffff;
    --card-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --focus: #1a73e8;
    --overlay: rgba(10, 14, 20, .55);

    --font-head: Georgia, "Times New Roman", Times, serif;
    --font-body: Georgia, "Times New Roman", Times, serif;
    --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --fs-base: 1.125rem;       /* 18px */
    --lh: 1.65;
    --measure: 68ch;           /* ~70 ký tự / dòng */
    --radius: 10px;
    --gap: 1rem;
    --wrap: 1160px;
    color-scheme: light;
}

/* ---------- Biến: Reader · Tối ---------- */
[data-theme="dark"] {
    --bg: #0f1115;
    --surface: #171a21;
    --text: #e8e8e6;
    --text-2: #c3c6cc;
    --muted: #9aa0aa;
    --line: #262a33;
    --brand: #e8e8e6;
    --accent: #f2a900;         /* hổ phách */
    --link: #8ab4f8;
    --link-hover: #f2a900;
    --btn-bg: #f2a900;
    --btn-text: #111111;
    --card-shadow: 0 0 0 1px #262a33;
    --focus: #8ab4f8;
    --overlay: rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.skip-link {
    position: absolute; left: -9999px; top: 8px; z-index: 1000;
    background: var(--brand); color: var(--bg); padding: .6rem 1rem; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--brand); }
.brand__mark {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 6px;
    background: var(--accent); color: var(--btn-text); font: 700 1.05rem/1 var(--font-head);
}
.brand__name { font: 700 1.3rem/1 var(--font-head); letter-spacing: -.01em; color: var(--brand); }
.brand__logo { height: 32px; width: auto; }
.site-nav { display: flex; gap: 1rem; margin-left: auto; font-size: .95rem; }
.site-nav a { color: var(--text-2); text-decoration: none; font-weight: 600; padding: .5rem 0; }
.site-nav a:hover { color: var(--accent); }

.theme-toggle {
    min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px;
    background: transparent; color: var(--text); cursor: pointer; display: inline-grid; place-items: center;
}
/* Biểu tượng vẽ bằng CSS (không phụ thuộc font): ◐ theo máy · ○ sáng · ☾ tối (bấm để đổi) */
.theme-toggle__icon {
    display: block; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
[data-theme-mode="light"] .theme-toggle__icon { background: transparent; }
[data-theme-mode="dark"] .theme-toggle__icon { border: 0; background: transparent; box-shadow: inset 6px -4px 0 0 currentColor; transform: rotate(-20deg); }

/* ---------- Nút ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 44px; padding: .65rem 1.2rem; border-radius: 8px; border: 0;
    font: 700 1rem/1.2 var(--font-ui); text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--btn-bg); color: var(--btn-text); }
.btn--primary:hover { filter: brightness(1.07); color: var(--btn-text); }
.btn--block { width: 100%; }

/* ---------- Trang bài ---------- */
.site-main { padding: 1.25rem 0 2.5rem; outline: none; }
.layout-article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.article { min-width: 0; }

.breadcrumb { font-size: .85rem; color: var(--muted); display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.article__kicker {
    margin: 0 0 .4rem; font: 700 .8rem/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.article__title {
    margin: 0 0 .75rem; font: 700 clamp(1.7rem, 4.6vw, 2.6rem)/1.15 var(--font-head);
    letter-spacing: -.015em; color: var(--text);
}
.article__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem;
    margin: 0 0 1.25rem; font-size: .88rem; color: var(--muted);
}
.article__byline { font-weight: 700; color: var(--text-2); }
.article__updated { flex-basis: 100%; font-style: italic; }

.article__figure { margin: 0 0 1.5rem; }
.article__figure img { width: 100%; border-radius: var(--radius); background: var(--surface); aspect-ratio: 16 / 9; object-fit: cover; }
.article__figure figcaption { font-size: .8rem; color: var(--muted); margin-top: .4rem; }

.article__body { font-family: var(--font-body); font-size: var(--fs-base); line-height: var(--lh); max-width: var(--measure); color: var(--text); }
.article__body p { margin: 0 0 1.15em; }
.article__body p:first-of-type::first-letter {
    float: left; font: 700 3.4em/.85 var(--font-head); padding: .08em .1em 0 0; color: var(--accent);
}
.article__body a { word-break: break-word; }

.article__source { max-width: var(--measure); font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .9rem; margin-top: 1.5rem; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.5rem 0; max-width: var(--measure); }
.share__label { font-weight: 700; font-size: .9rem; margin-right: .25rem; color: var(--text-2); }
.share__btn {
    min-height: 40px; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line);
    background: transparent; color: var(--text); font: 600 .88rem/1 var(--font-ui); text-decoration: none; cursor: pointer;
    display: inline-flex; align-items: center;
}
.share__btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Khối Amazon trong bài ---------- */
.aff-card {
    font-family: var(--font-ui); background: var(--surface); border: 1px solid var(--line);
    border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1.6rem 0;
}
.aff-card__label { display: inline-block; font: 700 .7rem/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.aff-card__title { font: 700 1.15rem/1.3 var(--font-head); margin: 0 0 .35rem; color: var(--text); }
.aff-card__text { margin: 0 0 .85rem; font-size: .98rem; color: var(--text-2); }
.aff-card__note { margin: .65rem 0 0; font-size: .75rem; color: var(--muted); }
.article__body .aff-card p:first-of-type::first-letter { float: none; font: inherit; padding: 0; color: inherit; }

/* ---------- Chỗ quảng cáo (phần 3) — giữ chiều cao, không giật trang ---------- */
.ad-slot { display: block; margin: 1.6rem auto; text-align: center; min-height: 280px; }
.ad-slot::before { content: "Advertisement"; display: block; font: 600 .7rem/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }

/* ---------- Bài liên quan / sidebar ---------- */
.sidebar { min-width: 0; }
.related__title { font: 700 1.05rem/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--accent); padding-bottom: .5rem; margin: 0 0 .75rem; }
.related__list { list-style: none; margin: 0; padding: 0; }
.related__item + .related__item { border-top: 1px solid var(--line); }
.card-link { display: flex; gap: .8rem; padding: .75rem 0; text-decoration: none; color: inherit; border-radius: 6px; }
.card-link:hover .related__headline, .card-link:hover .story__headline { color: var(--accent); }
.related__img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface); }
.related__text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.related__headline { font: 700 1rem/1.3 var(--font-head); color: var(--text); }
.related__time { font-size: .8rem; color: var(--muted); }

/* ---------- Trang chủ tạm ---------- */
.home__title { font: 700 1.6rem/1.2 var(--font-head); margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 3px solid var(--accent); }
.story-list { list-style: none; margin: 0; padding: 0; }
.story + .story { border-top: 1px solid var(--line); }
.story__link { padding: 1rem 0; }
.story__img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface); }
.story__body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.story__kicker { font: 700 .72rem/1 var(--font-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.story__headline { font: 700 1.12rem/1.3 var(--font-head); color: var(--text); }
.story__summary { color: var(--text-2); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story__time { font-size: .8rem; color: var(--muted); }

.notfound { text-align: center; padding: 3rem 16px; }
.notfound h1 { font: 700 2rem/1.2 var(--font-head); }
.gone-list { list-style: none; padding: 0; margin: 1.25rem auto; max-width: 640px; text-align: left; }
.gone-list li { border-top: 1px solid var(--line); }
.gone-list a { display: block; padding: .7rem 0; color: var(--text); font-weight: 600; text-decoration: none; }
.gone-list a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 1.75rem 0; font-size: .88rem; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: .75rem; }
.footer-nav a { color: var(--text-2); text-decoration: none; padding: .35rem 0; }
.footer-nav a:hover { color: var(--accent); }
.footer-note, .footer-copy { margin: .3rem 0; }

/* ---------- Popup Amazon ----------
   Điện thoại (< 640px): phủ toàn màn, lớp nền MỜ (vẫn đọc được tiêu đề bài phía sau),
   ⓘ góc trên trái, ✕ góc trên phải, nhãn Sponsored góc dưới trái, thẻ nội dung ở giữa.
   Tablet / PC (≥ 640px): hộp 480px giữa màn (xem media query bên dưới). */
.aff-pop { position: fixed; inset: 0; z-index: 200; }
.aff-pop__backdrop {
    position: absolute; inset: 0;
    background: var(--pop-veil, rgba(255, 255, 255, .62));
    opacity: 0; transition: opacity .2s ease;
}
[data-theme="dark"] .aff-pop__backdrop { background: var(--pop-veil-dark, rgba(15, 17, 21, .5)); }
.aff-pop__dialog {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 72px 16px 56px; font-family: var(--font-ui); color: var(--text);
    pointer-events: none;   /* chỉ các nút / thẻ nhận chạm */
}
.aff-pop__dialog > * { pointer-events: auto; }
.aff-pop__card {
    width: 100%; max-width: 420px; margin-top: 18vh;   /* để trống phần trên → thấy tiêu đề bài */
    background: var(--bg); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22); padding: 1.4rem 1.2rem 1.1rem; text-align: center;
    transform: translateY(14px) scale(.98); opacity: 0; transition: transform .22s ease, opacity .22s ease;
}
.aff-pop.is-open .aff-pop__backdrop { opacity: 1; }
.aff-pop.is-open .aff-pop__card { transform: none; opacity: 1; }

.aff-pop__media { display: flex; justify-content: center; margin-bottom: .9rem; }
.aff-pop__badge { max-width: 220px; max-height: 72px; width: auto; height: auto; }
.aff-pop__icon {
    display: inline-grid; place-items: center; width: 88px; height: 88px; border-radius: 22px;
    background: var(--accent); color: var(--btn-text); box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.aff-pop__title { font: 700 1.45rem/1.25 var(--font-ui); margin: 0 0 .45rem; color: var(--text); }
.aff-pop__text { margin: 0 0 1.1rem; color: var(--text-2); font-size: 1.02rem; line-height: 1.45; }
.btn--lg { min-height: 52px; font-size: 1.1rem; border-radius: 10px; }
.aff-pop__note { margin-top: .75rem; }

.aff-pop__close, .aff-pop__info {
    position: absolute; top: 14px; width: 44px; height: 44px; border-radius: 999px; border: 0;
    display: inline-grid; place-items: center; cursor: pointer; text-decoration: none;
    background: rgba(90, 90, 90, .72); color: #fff;
    opacity: 0; transition: opacity .2s ease;
}
.aff-pop__close { right: 14px; font-size: 1.7rem; line-height: 1; }
.aff-pop__info { left: 14px; font: 700 1.05rem/1 Georgia, serif; font-style: italic; }
.aff-pop__close:hover, .aff-pop__info:hover { background: rgba(60, 60, 60, .9); color: #fff; }
.aff-pop.is-open .aff-pop__close, .aff-pop.is-open .aff-pop__info { opacity: 1; }
.aff-pop__label {
    position: absolute; left: 14px; bottom: 14px; padding: .2rem .5rem; border-radius: 4px;
    background: rgba(120, 120, 120, .18); color: var(--muted); font: 600 .72rem/1.2 var(--font-ui);
    letter-spacing: .04em;
}
body.no-scroll { overflow: hidden; }

/* ---------- Máy tính bảng ---------- */
@media (min-width: 640px) {
    .wrap { padding: 0 24px; }
    /* Popup: hộp 480px giữa màn, nền tối nhẹ */
    .aff-pop__backdrop, [data-theme="dark"] .aff-pop__backdrop { background: var(--overlay); }
    .aff-pop__dialog {
        inset: auto; top: 50%; left: 50%; transform: translate(-50%, -46%) scale(.98);
        width: min(480px, calc(100% - 48px)); padding: 0; display: block;
        opacity: 0; transition: transform .22s ease, opacity .22s ease;
    }
    .aff-pop.is-open .aff-pop__dialog { transform: translate(-50%, -50%); opacity: 1; }
    .aff-pop__card { max-width: none; margin: 0; padding: 2rem 1.75rem 2.6rem; transform: none; opacity: 1; }
    .aff-pop__close, .aff-pop__info { top: 10px; background: transparent; color: var(--muted); }
    .aff-pop__close { right: 10px; }
    .aff-pop__info { left: 10px; border: 1px solid var(--line); width: 32px; height: 32px; top: 16px; left: 16px; font-size: .9rem; }
    .aff-pop__close:hover, .aff-pop__info:hover { background: var(--surface); color: var(--text); }
    .aff-pop__label { left: 16px; bottom: 12px; }
    .story__img { width: 200px; height: 125px; }
    .related__img { width: 120px; height: 80px; }
}

/* Quảng cáo thanh bên chỉ hiện trên PC (dưới 1024px thanh bên nằm cuối bài) */
@media (max-width: 1023.98px) { .ad-slot--sidebar { display: none; } }

/* ---------- PC ---------- */
@media (min-width: 1024px) {
    :root { --fs-base: 1.1875rem; }   /* 19px */
    .layout-article { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; }
    .sidebar { position: sticky; top: 76px; align-self: start; }
}

/* ---------- TV / màn rất lớn: chữ to ~1.4x, khung chọn rõ cho remote ---------- */
@media (min-width: 1920px) {
    html { font-size: 140%; }
    :root { --wrap: 1500px; }
    :focus-visible { outline-width: 5px; outline-offset: 4px; }
    .card-link:focus-visible { outline: 5px solid var(--focus); }
}

/* ==========================================================================
   PHẦN 2 — Template, trang chủ / chuyên mục, phân trang, trang tĩnh
   ========================================================================== */

/* ---------- Template: Newsprint (báo in kiểu Anh, nền kem, serif) ---------- */
[data-template="newsprint"][data-theme="light"] {
    --bg: #f8f5ee; --surface: #efe9dc; --text: #1a1a1a; --text-2: #3d3a35; --muted: #6f6a60; --line: #ddd5c4;
    --brand: #1a1a1a; --accent: #8c1c13; --link: #7a1a12; --link-hover: #1a1a1a; --btn-bg: #8c1c13; --btn-text: #fff;
    --font-ui: Georgia, "Times New Roman", Times, serif; --radius: 4px;
}
[data-template="newsprint"][data-theme="dark"] {
    --bg: #1a1916; --surface: #23211d; --text: #ece6da; --text-2: #cfc7b8; --muted: #a39b8c; --line: #34302a;
    --brand: #ece6da; --accent: #d9a05b; --link: #e2b57d; --link-hover: #fff; --btn-bg: #d9a05b; --btn-text: #1a1916;
    --font-ui: Georgia, "Times New Roman", Times, serif; --radius: 4px;
}
[data-template="newsprint"] .site-header { border-bottom: 3px double var(--text); }
[data-template="newsprint"] .brand__name { font-size: 1.55rem; letter-spacing: .01em; }
[data-template="newsprint"] .brand__mark { border-radius: 2px; }
[data-template="newsprint"] .section-title, [data-template="newsprint"] .related__title { border-bottom-style: double; border-bottom-width: 3px; }

/* ---------- Template: Modern (không chân, nhiều khoảng trắng, xanh dương) ---------- */
[data-template="modern"][data-theme="light"] {
    --bg: #ffffff; --surface: #f3f5f8; --text: #111827; --text-2: #374151; --muted: #6b7280; --line: #e5e7eb;
    --brand: #111827; --accent: #2563eb; --link: #1d4ed8; --link-hover: #2563eb; --btn-bg: #2563eb; --btn-text: #fff;
}
[data-template="modern"][data-theme="dark"] {
    --bg: #0b1220; --surface: #111a2e; --text: #e5e7eb; --text-2: #cbd5e1; --muted: #94a3b8; --line: #1f2a44;
    --brand: #e5e7eb; --accent: #60a5fa; --link: #93c5fd; --link-hover: #bfdbfe; --btn-bg: #60a5fa; --btn-text: #0b1220;
}
[data-template="modern"] {
    --font-head: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 14px; --lh: 1.7;
}
[data-template="modern"] .article__title, [data-template="modern"] .lead__headline { letter-spacing: -.025em; }
[data-template="modern"] .article__body p:first-of-type::first-letter { float: none; font: inherit; padding: 0; color: inherit; }
[data-template="modern"] .brand__mark { border-radius: 10px; }

/* ---------- Template: Midnight (ưu tiên tối, nhấn hổ phách) ---------- */
[data-template="midnight"][data-theme="dark"] {
    --bg: #0d0f14; --surface: #151922; --text: #e9e9e9; --text-2: #c6c9d0; --muted: #9097a3; --line: #232835;
    --brand: #ffffff; --accent: #ffb020; --link: #ffc657; --link-hover: #ffffff; --btn-bg: #ffb020; --btn-text: #111;
}
[data-template="midnight"][data-theme="light"] {
    --bg: #f4f5f7; --surface: #e9ebef; --text: #14161b; --text-2: #343842; --muted: #5f6672; --line: #d6d9e0;
    --brand: #14161b; --accent: #b45309; --link: #9a4a07; --link-hover: #14161b; --btn-bg: #b45309; --btn-text: #fff;
}
[data-template="midnight"] {
    --font-head: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-template="midnight"] .article__title, [data-template="midnight"] .lead__headline { font-weight: 800; letter-spacing: -.02em; }

/* ---------- Tiện ích ---------- */
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.empty { padding: 2rem 0; }
.section-title {
    font: 700 .95rem/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .07em; color: var(--text);
    border-bottom: 2px solid var(--accent); padding-bottom: .45rem; margin: 1.75rem 0 .5rem;
}

/* ---------- Menu: điện thoại = hàng riêng, cuộn ngang ---------- */
.site-header__inner { flex-wrap: wrap; }
.site-nav {
    order: 3; flex-basis: 100%; margin-left: 0; gap: 1.15rem;
    overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--line); padding: .1rem 0;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { display: inline-flex; align-items: center; min-height: 40px; border-bottom: 2px solid transparent; }
.site-nav a.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.theme-toggle { margin-left: auto; }

/* ---------- Bài nổi bật ---------- */
.lead { margin: .25rem 0 .5rem; }
.lead__link { display: grid; gap: .9rem; text-decoration: none; color: inherit; border-radius: var(--radius); }
.lead__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.lead__body { display: flex; flex-direction: column; gap: .45rem; }
.lead__kicker { font: 700 .78rem/1 var(--font-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.lead__headline { font: 700 clamp(1.6rem, 5vw, 2.4rem)/1.15 var(--font-head); color: var(--text); letter-spacing: -.015em; }
.lead__summary { font: 400 1.05rem/1.55 var(--font-body); color: var(--text-2); }
.lead__time { font-size: .82rem; color: var(--muted); }
.lead__link:hover .lead__headline { color: var(--accent); }

/* ---------- Lưới (magazine) ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.tile__link { display: flex; flex-direction: column; gap: .6rem; text-decoration: none; color: inherit; border-radius: var(--radius); height: 100%; }
.tile__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--surface); display: block; }
.tile__img--empty { background: linear-gradient(135deg, var(--surface), var(--line)); }
.tile__body { display: flex; flex-direction: column; gap: .35rem; }
.tile__kicker { font: 700 .72rem/1 var(--font-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.tile__headline { font: 700 1.12rem/1.3 var(--font-head); color: var(--text); }
.tile__time { font-size: .8rem; color: var(--muted); }
.tile__link:hover .tile__headline { color: var(--accent); }
.feed-ad { list-style: none; grid-column: 1 / -1; }

/* Danh sách (list) trên điện thoại: ảnh nhỏ bên trái — kế thừa .story ở phần 1 */
.home--list .story-list { margin-top: .25rem; }

/* ---------- Đầu trang chuyên mục ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--accent); margin: 0 0 1rem; padding-bottom: .5rem; }
.section-head__title { font: 700 clamp(1.6rem, 4.5vw, 2.3rem)/1.15 var(--font-head); margin: 0; }
.section-head__rss { font: 700 .75rem/1 var(--font-ui); letter-spacing: .06em; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .7rem; }
.section-head__rss:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Phân trang ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin: 2rem 0 .5rem; font-family: var(--font-ui); }
.pager__nums { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.pager__btn, .pager__num {
    display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 .8rem;
    border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600;
}
.pager__btn:hover, .pager__num:hover { border-color: var(--accent); color: var(--accent); }
.pager__num.is-current { background: var(--accent); border-color: var(--accent); color: var(--btn-text); }
.pager__gap { display: inline-grid; place-items: center; min-width: 24px; color: var(--muted); }

/* ---------- Trang tĩnh (About, Privacy…) ---------- */
.prose-page { max-width: 760px; }
.prose-page__title { font: 700 clamp(1.8rem, 5vw, 2.5rem)/1.15 var(--font-head); margin: .5rem 0 1.25rem; padding-bottom: .6rem; border-bottom: 3px solid var(--accent); }
.prose { font: 400 1.0625rem/1.7 var(--font-body); color: var(--text); }
.prose .lede { font-size: 1.2rem; color: var(--text-2); }
.prose h2 { font: 700 1.3rem/1.3 var(--font-head); margin: 2rem 0 .6rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: .35rem 0; }
.prose p { margin: 0 0 1rem; }

/* ---------- Thẻ có thể chọn bằng remote / bàn phím ---------- */
[data-nav]:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

@media (min-width: 640px) {
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
@media (min-width: 900px) {
    .site-nav { order: 0; flex-basis: auto; margin-left: auto; border-top: 0; padding: 0; }
    .theme-toggle { margin-left: 0; }
}
@media (min-width: 1024px) {
    .lead__link { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center; gap: 1.75rem; }
    .lead__headline { font-size: clamp(1.9rem, 2.8vw, 2.6rem); }
    .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1920px) {
    .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
    [data-nav]:focus-visible { outline-width: 5px; outline-offset: 6px; }
    [data-nav]:focus-visible .tile__headline, [data-nav]:focus-visible .lead__headline,
    [data-nav]:focus-visible .story__headline, [data-nav]:focus-visible .related__headline { color: var(--accent); }
}

/* ---------- Giảm chuyển động ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- In ---------- */
@media print {
    .site-header, .site-footer, .sidebar, .share, .aff-card, .aff-pop, .ad-slot { display: none !important; }
    body { background: #fff; color: #000; }
}
