/* AffShelf Theme. Màu và font lấy từ biến --ast-* (Customizer in ra :root). */
:root {
  --ast-line: color-mix(in srgb, var(--ast-ink) 12%, transparent);
  --ast-muted: color-mix(in srgb, var(--ast-ink) 64%, var(--ast-bg));
  --ast-accent-soft: color-mix(in srgb, var(--ast-accent) 10%, var(--ast-bg));
  --ast-radius: 12px;
  --ast-wrap: 1200px;
  --ast-content: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ast-bg); color: var(--ast-ink); font: 17px/1.65 var(--ast-font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--ast-accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ast-highlight); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--ast-heading-font); line-height: 1.22; letter-spacing: -.015em; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.8rem); }
h3 { font-size: 1.25rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ast-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ast-ink); color: var(--ast-bg); padding: .5em 1em; border-radius: 6px; }
.ast-skip:focus { left: 8px; }
.ast-wrap { width: 100%; max-width: var(--ast-wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.ast-header { position: sticky; top: 0; z-index: 50; background: var(--ast-bg); box-shadow: 0 1px 0 var(--ast-line); }
.admin-bar .ast-header { top: 32px; }
.ast-header__top { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.ast-logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--ast-ink); flex: none; }
.ast-logo__img { height: 36px; width: auto; display: block; }
.ast-logo__text { font-family: var(--ast-heading-font); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.ast-search { margin-left: auto; display: flex; align-items: center; border: 1px solid var(--ast-line); border-radius: 999px; background: var(--ast-bg); width: min(340px, 40vw); }
.ast-search input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font: inherit; font-size: .92rem; padding: .5em 1em; color: inherit; }
.ast-search input:focus { outline: none; }
.ast-search:focus-within { border-color: var(--ast-accent); box-shadow: 0 0 0 3px var(--ast-accent-soft); }
.ast-search button { border: 0; background: none; color: var(--ast-muted); padding: .45em .8em; cursor: pointer; display: flex; }
.ast-nav-toggle { flex: none; display: none; border: 1px solid var(--ast-line); background: none; color: var(--ast-ink); border-radius: 8px; padding: 6px; cursor: pointer; }
.ast-nav { background: var(--ast-dark); color: #fff; }
.ast-nav__inner { display: flex; align-items: center; gap: 12px; }
.ast-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.ast-menu--right { margin-left: auto; }
.ast-menu > li { position: relative; }
.ast-menu a { display: block; padding: .7em .85em; color: inherit; text-decoration: none; font-weight: 600; font-size: .92rem; border-radius: 6px; }
.ast-nav .ast-menu > li > a:hover, .ast-nav .current-menu-item > a, .ast-nav .current-category-ancestor > a { background: color-mix(in srgb, #fff 12%, transparent); }
.ast-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; list-style: none; margin: 0; padding: 6px; background: var(--ast-bg); color: var(--ast-ink); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); }
.ast-menu .sub-menu a { font-weight: 500; }
.ast-menu .sub-menu a:hover { background: var(--ast-soft); }
.ast-menu > li:hover > .sub-menu, .ast-menu > li:focus-within > .sub-menu { display: block; }
.ast-menu--right .menu-item:last-child > a { white-space: nowrap; background: var(--ast-highlight); color: var(--ast-dark); border-radius: 999px; padding: .4em 1em; margin: .3em 0; }
.ast-topbar { background: var(--ast-soft); color: var(--ast-muted); font-size: .8rem; text-align: center; padding: .45em 0; }
.ast-topbar a { color: inherit; font-weight: 600; }

/* ---------- nút, nhãn ---------- */
.ast-btn { display: inline-block; padding: .8em 1.4em; border-radius: 999px; background: var(--ast-accent); color: var(--ast-accent-text); font-weight: 700; text-decoration: none; border: 2px solid var(--ast-accent); }
.ast-btn:hover { filter: brightness(1.08); }
.ast-btn--ghost { background: transparent; color: var(--ast-accent); }
.ast-eyebrow { display: inline-block; margin: 0 0 1em; padding: .3em .8em; border-radius: 6px; background: var(--ast-highlight); color: var(--ast-dark); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- trang chủ ---------- */
.ast-hero { background: linear-gradient(180deg, var(--ast-accent-soft), var(--ast-bg)); padding: clamp(40px, 6vw, 80px) 0; }
.ast-hero__inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.ast-hero__inner:not(:has(.ast-hero__aside)) { grid-template-columns: minmax(0, 760px); }
.ast-hero__title { margin: 0 0 .4em; font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); }
.ast-hero__title span { color: var(--ast-accent); }
.ast-hero__text { font-size: 1.12rem; color: var(--ast-muted); max-width: 640px; margin: 0 0 1.6em; }
.ast-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.ast-hero__aside { background: var(--ast-bg); border: 1px solid var(--ast-line); border-radius: var(--ast-radius); padding: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .06); }

.ast-section { padding: clamp(36px, 5vw, 64px) 0; }
.ast-section--soft { background: var(--ast-soft); }
.ast-section__title { margin: 0 0 .3em; }
.ast-section__text { color: var(--ast-muted); margin: 0 0 1.4em; }
.ast-section__title + .ast-grid, .ast-section__title + .ast-cats { margin-top: 1.2em; }

.ast-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.ast-cat { display: flex; flex-direction: column; gap: .35em; padding: 18px; border: 1px solid var(--ast-line); border-radius: var(--ast-radius); text-decoration: none; color: var(--ast-ink); background: var(--ast-bg); transition: border-color .15s, transform .15s; }
.ast-cat:hover { border-color: var(--ast-accent); transform: translateY(-2px); }
.ast-cat__icon { color: var(--ast-accent); width: 30px; height: 30px; }
.ast-cat__icon svg, .ast-cat__icon img { width: 100%; height: 100%; }
.ast-cat__name { font-weight: 700; font-size: 1.02rem; }
.ast-cat__desc { color: var(--ast-muted); font-size: .88rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ast-cats--n2, .ast-cats--n4 { grid-template-columns: repeat(2, 1fr); }
.ast-cats--n3, .ast-cats--n6, .ast-cats--n9 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 1081px) { .ast-cats--n4 { grid-template-columns: repeat(4, 1fr); } .ast-cats--n8 { grid-template-columns: repeat(4, 1fr); } }

.ast-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ast-trust__item { padding: 22px; border-radius: var(--ast-radius); background: var(--ast-soft); }
.ast-trust__title { margin: 0 0 .4em; font-size: 1.1rem; }
.ast-trust__item p { margin: 0; color: var(--ast-muted); font-size: .95rem; }

/* ---------- thẻ bài ---------- */
.ast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px 22px; }
.ast-card { display: flex; flex-direction: column; min-width: 0; }
.ast-card__img { display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--ast-soft); border: 1px solid var(--ast-line); }
.ast-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.ast-card:hover .ast-card__img img { transform: scale(1.03); }
.ast-card__ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.5rem; font-weight: 800; color: var(--ast-accent); }
.ast-card__body { padding-top: 12px; }
.ast-card__meta { font-size: .78rem; color: var(--ast-muted); margin-bottom: .3em; }
.ast-card__meta span { color: var(--ast-accent); font-weight: 600; }
.ast-card__title { margin: 0 0 .35em; font-size: 1.08rem; line-height: 1.32; }
.ast-card__title a { color: var(--ast-ink); text-decoration: none; }
.ast-card__title a:hover { color: var(--ast-accent); }
.ast-card__excerpt { margin: 0; color: var(--ast-muted); font-size: .9rem; line-height: 1.55; }

/* ---------- archive ---------- */
.ast-archive { padding: 32px 20px 64px; }
.ast-archive__head { margin-bottom: 30px; max-width: 820px; }
.ast-archive__title { margin: .2em 0 .3em; }
.ast-archive__desc { color: var(--ast-muted); font-size: 1.05rem; }
.ast-archive__desc p { margin: 0 0 .6em; }
.ast-chips { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ast-chips a { display: inline-block; padding: .35em .9em; border: 1px solid var(--ast-line); border-radius: 999px; text-decoration: none; color: var(--ast-ink); font-size: .9rem; font-weight: 600; }
.ast-chips a:hover { border-color: var(--ast-accent); color: var(--ast-accent); }
.ast-chips span { color: var(--ast-muted); font-weight: 400; }
.ast-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 40px; }
.ast-pagination .page-numbers { padding: .45em .85em; border: 1px solid var(--ast-line); border-radius: 8px; text-decoration: none; color: var(--ast-ink); }
.ast-pagination .current { background: var(--ast-accent); color: var(--ast-accent-text); border-color: var(--ast-accent); }
.ast-empty { color: var(--ast-muted); }
.search-form { display: flex; gap: 8px; max-width: 520px; margin-top: 12px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; padding: .6em .9em; border: 1px solid var(--ast-line); border-radius: 8px; font: inherit; }
.search-form .search-submit { padding: .6em 1.2em; border: 0; border-radius: 8px; background: var(--ast-accent); color: var(--ast-accent-text); font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- bài viết ---------- */
.ast-single { display: grid; grid-template-columns: minmax(0, var(--ast-content)) 260px; gap: 56px; justify-content: center; padding-top: 28px; padding-bottom: 56px; }
.ast-single--notoc { grid-template-columns: minmax(0, var(--ast-content)); }
.ast-page { max-width: calc(var(--ast-content) + 40px); padding-top: 28px; padding-bottom: 56px; }
.ast-page--wide { max-width: var(--ast-wrap); }
.ast-crumbs { font-size: .82rem; color: var(--ast-muted); margin-bottom: .6em; }
.ast-crumbs a { color: inherit; text-decoration: none; }
.ast-crumbs a:hover { color: var(--ast-accent); text-decoration: underline; }
.ast-crumbs__sep, .ast-crumbs .separator { margin: 0 .45em; }
.ast-article__title { margin: 0 0 .35em; }
.ast-article__dek { font-size: 1.15rem; color: var(--ast-muted); margin: 0 0 1em; }
.ast-byline { display: flex; align-items: center; gap: 10px; font-size: .88rem; margin-bottom: 22px; }
.ast-byline__avatar { border-radius: 50%; display: block; }
.ast-byline__by { display: block; font-weight: 600; }
.ast-byline__by a { color: var(--ast-ink); }
.ast-byline__meta { display: block; color: var(--ast-muted); font-size: .82rem; }
.ast-article__hero { margin: 0 0 28px; }
.ast-article__hero img { display: block; width: 100%; border-radius: var(--ast-radius); border: 1px solid var(--ast-line); }

.ast-content > :first-child { margin-top: 0; }
.ast-content h2 { padding-top: .4em; }
.ast-content p, .ast-content ul, .ast-content ol { margin: 0 0 1.15em; }
.ast-content li { margin: .3em 0; }
.ast-content img { border-radius: 8px; }
.ast-content blockquote { margin: 1.5em 0; padding: .4em 0 .4em 1.2em; border-left: 4px solid var(--ast-accent); color: var(--ast-muted); }
.ast-content table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0; }
.ast-content th, .ast-content td { padding: .65em .75em; border-bottom: 1px solid var(--ast-line); text-align: left; vertical-align: top; }
.ast-content thead th { background: var(--ast-dark); color: #fff; font-weight: 600; border: 0; }
.ast-content tbody tr:nth-child(even) { background: var(--ast-soft); }
.ast-table-scroll { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--ast-line); border-radius: 10px; }
.ast-table-scroll table th:first-child, .ast-table-scroll table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--ast-bg); }
/* Cột dính cần nền đặc: inherit lấy nền trong suốt của tr, làm ô tiêu đề mất chữ trắng và chữ cuộn lộ qua ô lẻ. */
.ast-table-scroll tbody tr:nth-child(even) > :first-child { background: var(--ast-soft); }
.ast-table-scroll thead th:first-child { background: var(--ast-dark); }
.ast-content .affiliate-disclosure, .ast-content .affshelf-disclosure { font-size: .85rem; color: var(--ast-muted); }
.ast-content code { background: var(--ast-soft); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.ast-content hr { border: 0; border-top: 1px solid var(--ast-line); margin: 2em 0; }
.ast-content .wp-caption-text, .ast-content figcaption { font-size: .82rem; color: var(--ast-muted); text-align: center; }

.ast-single__side { position: relative; }
.ast-toc--side { padding-left: 16px; border-left: 2px solid var(--ast-line); }
/* Cột phải: Top picks + mục lục, cả cột dính khi cuộn */
.ast-side { position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow: auto; display: flex; flex-direction: column; gap: 26px; padding-bottom: 8px; scrollbar-width: thin; }
.ast-side-box { border: 1px solid var(--ast-line); border-radius: var(--ast-radius); background: var(--ast-bg); padding: 14px; }
.ast-side-box__h { margin: 0 0 .7em; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ast-muted); }
.ast-side-box ol, .ast-side-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ast-side-pick { display: flex; gap: 10px; align-items: flex-start; }
.ast-side-pick + .ast-side-pick { padding-top: 12px; border-top: 1px solid var(--ast-line); }
.ast-side-pick__img { position: relative; flex: none; width: 56px; height: 56px; border-radius: 8px; background: #fff; border: 1px solid var(--ast-line); display: flex; align-items: center; justify-content: center; }
.ast-side-pick__img img { width: 48px; height: 48px; object-fit: contain; border-radius: 0; }
.ast-side-pick__n { position: absolute; top: -7px; left: -7px; min-width: 20px; height: 20px; line-height: 20px; border-radius: 999px; background: var(--ast-accent); color: var(--ast-accent-text); font-size: .72rem; font-weight: 700; text-align: center; }
.ast-side-pick__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ast-side-pick__name { color: var(--ast-ink); font-weight: 700; font-size: .88rem; line-height: 1.3; text-decoration: none; }
.ast-side-pick__name:hover { color: var(--ast-accent); }
.ast-side-pick__score { font-size: .78rem; color: var(--ast-muted); }
.ast-side-pick__score b { color: var(--ast-ink); }
.ast-side-pick__btn { align-self: flex-start; margin-top: 4px; padding: .38em .8em; border-radius: 999px; background: var(--ast-accent); color: var(--ast-accent-text); font-size: .76rem; font-weight: 700; text-decoration: none; line-height: 1.2; }
.ast-side-pick__btn:hover { filter: brightness(1.1); }
.ast-side-box__note { margin: 12px 0 0; font-size: .72rem; line-height: 1.45; color: var(--ast-muted); }
.ast-side-box__note a { color: inherit; }
.ast-side-related a { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: var(--ast-ink); font-size: .85rem; font-weight: 600; line-height: 1.35; }
.ast-side-related a:hover span { color: var(--ast-accent); }
.ast-side-related img { flex: none; width: 72px; height: 45px; object-fit: cover; border-radius: 6px; border: 1px solid var(--ast-line); }
.ast-toc__h { margin: 0 0 .6em; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ast-muted); }
.ast-toc ol { list-style: none; margin: 0; padding: 0; }
.ast-toc li { margin: 0; }
.ast-toc a { display: block; padding: .32em 0; color: var(--ast-muted); text-decoration: none; font-size: .86rem; line-height: 1.4; }
.ast-toc a:hover, .ast-toc a.is-active { color: var(--ast-accent); }
.ast-toc--side a.is-active { font-weight: 600; box-shadow: -18px 0 0 -16px var(--ast-accent); }
.ast-toc-mobile { display: none; margin: 0 0 24px; border: 1px solid var(--ast-line); border-radius: 10px; padding: .7em 1em; }
.ast-toc-mobile > summary { cursor: pointer; font-weight: 700; }
.ast-toc-mobile .ast-toc__h { display: none; }
.ast-toc-mobile ol { margin-top: .5em; }

.ast-author { display: flex; gap: 16px; align-items: flex-start; margin-top: 44px; padding: 22px; border-radius: var(--ast-radius); background: var(--ast-soft); }
.ast-author__avatar { border-radius: 50%; flex: none; display: block; }
.ast-author__label { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ast-muted); }
.ast-author__name { margin: .1em 0 .3em; font-weight: 700; font-size: 1.05rem; }
.ast-author__name a { color: var(--ast-ink); text-decoration: none; }
.ast-author__name span { font-weight: 400; color: var(--ast-muted); font-size: .88rem; }
.ast-author__bio { margin: 0; font-size: .92rem; color: var(--ast-muted); }
.ast-author--page { margin-top: 0; background: none; padding: 0; align-items: center; }
.ast-author--page .ast-archive__title { margin: 0; }

/* ---------- footer ---------- */
.ast-footer { background: var(--ast-dark); color: color-mix(in srgb, #fff 72%, transparent); font-size: .9rem; padding-top: 52px; }
.ast-footer a { color: inherit; text-decoration: none; }
.ast-footer a:hover { color: #fff; text-decoration: underline; }
.ast-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.ast-footer__brand .ast-logo { color: #fff; max-width: none; }
.ast-footer__brand p { max-width: 340px; }
.ast-footer__h { margin: 0 0 .8em; color: var(--ast-highlight); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ast-footer__links { list-style: none; margin: 0; padding: 0; }
.ast-footer__links li { margin: 0 0 .5em; }
.ast-footer__bottom { margin-top: 40px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid color-mix(in srgb, #fff 12%, transparent); font-size: .8rem; }

/* ---------- responsive ---------- */
/* Trang Buying Guides (template-guides.php) */
.ast-hub__jump { margin-top: 20px; }
.ast-hub__h { margin: 0 0 .5em; font-size: 1.5rem; }
.ast-hub__h a { color: inherit; text-decoration: none; }
.ast-hub__h a:hover { color: var(--ast-accent); }
.ast-hub__start { margin: 8px 0 8px; }
.ast-hub__start-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ast-hub-feature { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--ast-line); border-radius: var(--ast-radius); background: var(--ast-soft); }
.ast-hub-feature.is-main { grid-column: 1 / -1; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 28px; padding: 22px; }
.ast-hub-feature__img img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--ast-line); }
.ast-hub-feature__title { margin: 0 0 .4em; font-size: 1.1rem; line-height: 1.3; }
.ast-hub-feature.is-main .ast-hub-feature__title { font-size: 1.45rem; }
.ast-hub-feature__title a { color: var(--ast-ink); text-decoration: none; }
.ast-hub-feature__title a:hover { color: var(--ast-accent); }
.ast-hub-feature__text { margin: 0 0 1em; color: var(--ast-muted); font-size: .95rem; }
.ast-hub-feature__btn { display: inline-block; padding: .55em 1.2em; border-radius: 999px; background: var(--ast-accent); color: var(--ast-accent-text); font-weight: 700; font-size: .9rem; text-decoration: none; }
.ast-hub__more { margin: 12px 0 0; font-weight: 600; }
.ast-hub-sec { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; padding: 40px 0; border-top: 1px solid var(--ast-line); scroll-margin-top: 120px; }
.ast-hub__start + .ast-hub-sec { margin-top: 32px; }
.ast-hub-sec__desc { margin: 0; color: var(--ast-muted); font-size: .95rem; }
.ast-hub-sec .ast-chips { margin-top: 14px; }
.ast-hub-sec__all { display: inline-block; margin-top: 16px; font-weight: 700; color: var(--ast-accent); text-decoration: none; }
.ast-hub-sec__all:hover { text-decoration: underline; }
.ast-hub-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; align-content: start; }
.ast-hub-item { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--ast-line); border-radius: var(--ast-radius); background: var(--ast-bg); transition: border-color .15s; }
.ast-hub-item:hover { border-color: var(--ast-accent); }
.ast-hub-item__img img { display: block; width: 100%; height: auto; border-radius: 6px; }
.ast-hub-item__meta { margin: 0 0 .25em; font-size: .75rem; color: var(--ast-muted); }
.ast-hub-item__title { margin: 0; font-size: .98rem; line-height: 1.35; }
.ast-hub-item__title a { color: var(--ast-ink); text-decoration: none; }
.ast-hub-item__title a:hover { color: var(--ast-accent); }
@media (max-width: 1080px) {
  .ast-hub-sec { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .ast-hub__start-list, .ast-hub-list { grid-template-columns: 1fr; }
  .ast-hub-feature, .ast-hub-feature.is-main { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .ast-hub-item { grid-template-columns: 104px minmax(0, 1fr); }
  .ast-hub-sec { padding: 30px 0; }
}

@media (max-width: 1080px) {
  .ast-single { grid-template-columns: minmax(0, var(--ast-content)); }
  .ast-single__side { display: none; }
  .ast-toc-mobile { display: block; }
}
@media (max-width: 860px) {
  .ast-hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .ast-trust { grid-template-columns: 1fr; }
  .ast-footer__grid { grid-template-columns: 1fr 1fr; }
  .ast-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 782px) {
  .admin-bar .ast-header { top: 0; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .ast-wrap { padding: 0 16px; }
  .ast-archive { padding: 24px 16px 48px; }
  .ast-header { position: relative; }
  .ast-header__top { gap: 10px; min-height: 58px; }
  .ast-search { width: auto; flex: 1 1 0; min-width: 0; }
  .ast-logo { flex: 0 1 auto; min-width: 0; max-width: 46%; }
  .ast-logo__img { max-width: 100%; height: auto; max-height: 32px; }
  .ast-logo__text { font-size: 1.1rem; line-height: 1.15; overflow-wrap: normal; }
  .ast-search input { padding: .45em .1em .45em .8em; }
  .ast-search button { padding: .45em .6em; }
  .ast-nav-toggle { display: flex; }
  .ast-nav { display: none; }
  .ast-nav.is-open { display: block; }
  .ast-nav__inner { flex-direction: column; align-items: stretch; padding: 8px 16px 14px; }
  .ast-menu { flex-direction: column; }
  .ast-menu--right { margin-left: 0; }
  .ast-menu .sub-menu { display: block; position: static; box-shadow: none; background: transparent; color: inherit; padding: 0 0 0 12px; }
  .ast-menu .sub-menu a:hover { background: color-mix(in srgb, #fff 10%, transparent); }
  .ast-menu--right .menu-item:last-child > a { display: inline-block; }
  .ast-grid { grid-template-columns: 1fr; gap: 26px; }
  .ast-cats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ast-cat { padding: 14px; }
  .ast-cat__desc { display: none; }
  .ast-footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .ast-logo__img { height: 30px; }
  .ast-logo { max-width: 52%; }
  .ast-cats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* trang rộng: khối công cụ chiếm hết, đoạn văn giữ độ rộng dễ đọc */
.ast-page--wide .ast-content > :where(p, ul, ol, h2, h3, h4, blockquote), .ast-page--wide .ast-article__head { max-width: var(--ast-content); }
