/* Trang con — Quỹ An Sinh */
.section--cream { background: linear-gradient(180deg, var(--cream-2), var(--cream)); }
.center-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.page-hero__h1--article { font-size: clamp(28px, 4vw, 48px) !important; }
.page-hero .page-hero__lead .ic { color: var(--gold-2); }

/* Split */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.split .lead + .lead { margin-top: 14px; }
.split__media { margin: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); }
.split__media img { width: 100%; aspect-ratio: 19 / 12; object-fit: cover; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.chips li { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; box-shadow: 0 8px 20px -16px rgba(60,20,10,.5); transition: transform .35s var(--ease), border-color .3s; }
.chips li:hover { transform: translateY(-4px); border-color: var(--gold); }
.chips .ic { color: var(--red-2); width: 22px; height: 22px; }

/* Rules */
.rules { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.rule { grid-column: span 2; position: relative; padding: 34px 28px 30px; border-radius: 22px; background: #fff; border: 1px solid var(--line); overflow: hidden; transform-style: preserve-3d; }
.rule:nth-child(4) { grid-column: 2 / span 2; }
.rule::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--red-2), var(--gold)); transform: scaleX(.25); transform-origin: left; transition: transform .6s var(--ease); }
.rule:hover::before { transform: scaleX(1); }
.rule__n { position: absolute; right: 22px; top: 14px; font-family: var(--serif); font-size: 64px; font-weight: 700; color: var(--cream-2); line-height: 1; }
.rule__ic { width: 50px; height: 50px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, var(--red-2), var(--red)); color: #fff; margin-bottom: 18px; position: relative; }
.rule h3 { font-size: 19px; margin-bottom: 8px; position: relative; }
.rule p { color: var(--muted); font-size: 15px; position: relative; }

/* Legal */
.legal { background: radial-gradient(100% 120% at 80% 0%, #3a1f74, var(--night)); color: #fff; }
.legal__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.legal__card { padding: 30px; border-radius: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(232,193,114,.25); transition: transform .4s var(--ease), background .3s; }
.legal__card:hover { transform: translateY(-6px); background: rgba(255,255,255,.1); }
.legal__card .ic { width: 34px; height: 34px; color: var(--gold-2); }
.legal__no { display: block; margin: 18px 0 6px; font-size: 26px; font-weight: 800; background: linear-gradient(180deg, #fff1cc, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.legal__card h3 { font-size: 17px; }
.legal__card p { color: rgba(255,255,255,.72); margin-top: 8px; font-size: 14.5px; }

/* Cat mini */
.cat-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-mini__item { position: relative; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; justify-content: end; padding: 18px; color: #fff; isolation: isolate; }
.cat-mini__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease); }
.cat-mini__item::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(87,11,36,.88)); }
.cat-mini__item:hover img { transform: scale(1.1); }
.cat-mini__ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); margin-bottom: 10px; }
.cat-mini__ic svg { width: 24px; height: 24px; }

/* Filters */
.filters { position: relative; display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; width: fit-content; margin: 0 auto 16px; isolation: isolate; }
.filters__btn { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border: 0; background: none; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--muted); transition: color .3s; }
.filters__btn[aria-selected="true"] { color: #fff; }
.filters__btn:hover:not([aria-selected="true"]) { color: var(--red-2); }
.filters__glider { position: absolute; left: 0; top: 0; z-index: -1; border-radius: 999px; background: linear-gradient(120deg, var(--red-2), var(--red)); box-shadow: 0 10px 24px -12px var(--red); }
.filters__count { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 30px; }

/* Project cards */
.prj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.prj { display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); transform-style: preserve-3d; transition: box-shadow .4s; }
.prj:hover { box-shadow: var(--shadow-lg); }
.prj__media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.prj__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.prj:hover .prj__media img { transform: scale(1.08); }
.prj__status { position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #fff; }
.prj__status--done { color: #1f7a4a; }
.prj__status--building { color: #b26a00; }
.prj__status::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.prj__status--building::before { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.prj__status.is-inline { position: static; padding: 0; background: none; }
.prj__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.prj__cat { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; color: var(--brown); text-transform: uppercase; letter-spacing: .04em; }
.prj__body h3 { font-size: 19px; line-height: 1.35; }
.prj__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13.5px; }
.prj__meta li { display: inline-flex; gap: 6px; align-items: center; }
.prj__meta .ic { color: var(--gold); }
.prj .link-arrow { font-size: 14.5px; }

/* Detail */
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 50px; align-items: start; }
.detail__side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 20px; }
.prose { font-size: 17px; line-height: 1.85; color: #37313b; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 26px; color: var(--red-2); margin-top: 36px; }
.prose__lead { font-size: 20px; color: var(--ink); font-weight: 500; border-left: 4px solid var(--gold); padding-left: 18px; }
.prose figure { margin: 28px 0; }
.prose figure img { border-radius: 20px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.prose figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; font-style: italic; }
.prose blockquote { margin: 30px 0; padding: 26px 30px; border-radius: 20px; background: var(--cream-2); font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--red); position: relative; }
.prose__note { font-size: 13.5px; color: var(--muted); font-style: italic; border-top: 1px dashed var(--line); padding-top: 14px; }
.timeline { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.timeline li { position: relative; padding-top: 34px; font-size: 14.5px; color: var(--muted); text-align: center; }
.timeline li::before { content: ''; position: absolute; top: 11px; left: 0; right: 0; height: 3px; background: var(--line); }
.timeline li.is-done::before { background: linear-gradient(90deg, var(--red-2), var(--gold)); }
.timeline li span { position: absolute; top: 2px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #fff; border: 3px solid var(--line); z-index: 1; }
.timeline li.is-done span { border-color: var(--red-2); background: var(--red-2); box-shadow: 0 0 0 5px rgba(201,32,88,.15); }
.timeline li.is-now span { animation: ring 1.6s infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 10px rgba(201,32,88,.05); } }
.timeline li.is-done b { color: var(--ink); }
.facts, .side-box { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.facts h3, .side-box h3 { font-size: 18px; margin-bottom: 14px; color: var(--red-2); }
.facts dl { margin: 0; display: grid; }
.facts dl div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.facts dl div:last-child { border: 0; }
.facts dt { color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.facts dt .ic { color: var(--gold); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.facts__cta { justify-content: center; }
.side-news { display: grid; gap: 14px; }
.side-news__item { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; }
.side-news__item img { width: 84px; height: 64px; object-fit: cover; border-radius: 12px; }
.side-news__item time { font-size: 12.5px; color: var(--brown); font-weight: 600; }
.side-news__item b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.4; font-weight: 600; transition: color .25s; }
.side-news__item:hover b { color: var(--red-2); }
.socials--dark a { background: var(--cream-2); color: var(--red); }
.socials--dark a:hover { color: #fff; }
.side-box--share .socials { margin-top: 0; }

/* News page */
.news-feature { margin-bottom: 26px; }
.ncard--wide { flex-direction: row; }
.ncard--wide .ncard__media { width: 56%; aspect-ratio: 16 / 10; flex: none; }
.ncard--wide .ncard__body { padding: 36px; justify-content: center; }
.ncard--wide h3 { font-size: 26px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

/* Contact */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 60px; }
.ccard { padding: 30px; border-radius: 22px; background: #fff; border: 1px solid var(--line); text-align: center; transition: transform .4s var(--ease), box-shadow .4s; }
.ccard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.ccard__ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--red-2), var(--red)); box-shadow: 0 0 0 8px rgba(201,32,88,.08); transition: transform .5s var(--ease); }
.ccard:hover .ccard__ic { transform: rotate(-12deg) scale(1.08); }
.ccard__ic svg { width: 28px; height: 28px; }
.ccard h3 { font-size: 18px; color: var(--red-2); }
.ccard p { color: var(--muted); margin-top: 6px; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact__name { font-size: 22px; color: var(--red-2); line-height: 1.4; }
.contact__en { color: var(--brown); font-weight: 600; letter-spacing: .06em; font-size: 13.5px; margin-top: 6px; }
.contact__list { margin: 22px 0; display: grid; gap: 12px; font-size: 15px; }
.contact__list li { display: flex; gap: 10px; align-items: flex-start; }
.contact__list .ic { color: var(--red-2); margin-top: 4px; }
.contact__list a { color: var(--red-2); font-weight: 600; }
.map { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--cream-2); }
.map iframe { width: 100%; height: 100%; border: 0; }
.form { position: relative; background: #fff; border-radius: 26px; padding: clamp(26px, 4vw, 42px); box-shadow: var(--shadow-lg); border: 1px solid var(--line); display: grid; gap: 16px; }
.form__title { font-size: 28px; color: var(--red-2); }
.form__sub { color: var(--muted); font-size: 14px; margin-top: -8px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; border: 0; padding: 0; margin: 0; min-width: 0; }
.field input, .field textarea { font: inherit; font-weight: 400; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--cream); transition: border-color .25s, box-shadow .25s, background .25s; width: 100%; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(201,151,63,.15); }
.field__err { display: none; color: var(--red-2); font-weight: 500; font-size: 13px; }
.is-invalid input { border-color: var(--red-2); }
.is-invalid .field__err { display: block; }
.is-invalid.check { color: var(--red-2); }
.field--choices { display: flex; flex-wrap: wrap; gap: 8px; }
.field--choices legend { margin-bottom: 8px; }
.field--choices label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 500; cursor: pointer; transition: border-color .25s, background .25s; }
.field--choices label:has(input:checked) { border-color: var(--red-2); background: #fff3f3; color: var(--red-2); }
.field--choices input, .check input { accent-color: var(--red-2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { margin-top: 4px; width: 17px; height: 17px; }
.form__submit { justify-content: center; }
.form__done { position: absolute; inset: 0; border-radius: inherit; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 30px; }
.form__done[hidden] { display: none; }
.form__done-ic { width: 90px; height: 90px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-2); color: var(--violet); }
.form__done-ic svg { width: 50px; height: 50px; }
.form__done h3 { font-size: 26px; color: var(--red-2); }
.form__done p { color: var(--muted); max-width: 340px; }

@media (max-width: 1024px) {
  .split, .detail, .contact { grid-template-columns: 1fr; }
  .detail__side { position: static; }
  .rules { grid-template-columns: 1fr 1fr; }
  .rule, .rule:nth-child(4) { grid-column: auto; }
  .cat-mini { grid-template-columns: repeat(3, 1fr); }
  .prj-grid, .news-grid { grid-template-columns: 1fr 1fr; }
  .legal__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .rules, .prj-grid, .news-grid, .contact-cards { grid-template-columns: 1fr; }
  .cat-mini { grid-template-columns: 1fr 1fr; }
  .filters { border-radius: 20px; width: 100%; justify-content: center; }
  .filters__btn { padding: 9px 14px; font-size: 13.5px; }
  .ncard--wide { flex-direction: column; }
  .ncard--wide .ncard__media { width: 100%; }
  .ncard--wide .ncard__body { padding: 22px; }
  .form__row { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 20px; }
}
.field--choices input { width: auto; padding: 0; border: 0; box-shadow: none; margin: 0; }

/* ---------- Thanh công cụ danh sách dự án: đếm · sắp xếp · lưới/danh sách ---------- */
.prj-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 26px 0 28px; padding: 12px 12px 12px 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 34px -28px rgba(60,20,10,.4); }
.prj-toolbar__count { margin: 0; display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 15px; }
.prj-toolbar__num { font-size: 28px; font-weight: 800; line-height: 1; color: var(--red-2); font-variant-numeric: tabular-nums; min-width: 1.2ch; }
.prj-toolbar__tools { display: flex; align-items: center; gap: 10px; }

.dropdown { position: relative; }
.dropdown__btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--cream); color: var(--ink); cursor: pointer; text-align: left; transition: border-color .3s, background .3s; }
.dropdown__btn:hover, .dropdown.is-open .dropdown__btn { border-color: rgba(201,151,63,.7); background: #fff; }
.dropdown__btn > .ic { width: 18px; height: 18px; color: var(--gold); }
.dropdown__label { display: flex; flex-direction: column; line-height: 1.15; min-width: 150px; }
.dropdown__label small { font-size: 11.5px; color: var(--muted); }
.dropdown__label b { font-size: 14.5px; font-weight: 700; }
.dropdown__chev { width: 16px; height: 16px; margin-left: auto; color: var(--muted); transition: transform .3s var(--ease); }
.dropdown.is-open .dropdown__chev { transform: rotate(180deg); }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 100%; width: max-content; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid rgba(201,151,63,.4); border-radius: 16px; box-shadow: 0 26px 50px -22px rgba(60,20,10,.45); outline: none; }
.dropdown__menu [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; cursor: pointer; }
.dropdown__menu [role="option"] .ic { width: 16px; height: 16px; color: var(--red-2); opacity: 0; }
.dropdown__menu [role="option"].is-active { background: rgba(201,151,63,.14); }
.dropdown__menu [role="option"][aria-selected="true"] { color: var(--red-2); font-weight: 700; }
.dropdown__menu [role="option"][aria-selected="true"] .ic { opacity: 1; }
.dropdown__btn:focus-visible, .view-switch__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.view-switch { position: relative; display: inline-flex; padding: 4px; gap: 4px; background: var(--cream); border: 1px solid var(--line); border-radius: 14px; isolation: isolate; }
.view-switch__btn { display: grid; place-items: center; width: 40px; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; transition: color .3s; }
.view-switch__btn .ic { width: 19px; height: 19px; }
.view-switch__btn[aria-pressed="true"] { color: #fff; }
.view-switch__glider { position: absolute; left: 4px; top: 4px; z-index: -1; width: 40px; height: 38px; border-radius: 10px; background: linear-gradient(120deg, var(--red-2), var(--red)); box-shadow: 0 8px 18px -10px var(--red); }

/* Thẻ dự án: phần chỉ hiện ở dạng danh sách */
.prj__desc { display: none; margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.prj__foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prj__foot .link-arrow { margin-top: 0; padding-top: 0; }
.prj__budget { display: none; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.prj__budget .ic { color: var(--gold); }
.prj__budget b { color: var(--ink); }

.prj-grid.is-list { grid-template-columns: 1fr; gap: 18px; }
.prj-grid.is-list .prj { flex-direction: row; }
.prj-grid.is-list .prj__media { flex: 0 0 34%; aspect-ratio: auto; min-height: 220px; }
.prj-grid.is-list .prj__body { padding: 24px 28px; justify-content: center; }
.prj-grid.is-list .prj__body h3 { font-size: 21px; }
.prj-grid.is-list .prj__desc { display: block; max-width: 640px; }
.prj-grid.is-list .prj__budget { display: inline-flex; }
.prj-grid.is-list .prj__foot { padding-top: 14px; border-top: 1px dashed var(--line); }

@media (max-width: 760px) {
  .prj-toolbar { padding: 12px; }
  .prj-toolbar__count { width: 100%; justify-content: center; }
  .prj-toolbar__tools { width: 100%; }
  .dropdown { flex: 1; }
  .dropdown__btn { width: 100%; }
  .dropdown__label { min-width: 0; }
  .prj-grid.is-list .prj { flex-direction: column; }
  .prj-grid.is-list .prj__media { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
  .prj-grid.is-list .prj__body { padding: 20px; }
}

/* ---------- Trang tìm kiếm ---------- */
.search-hero { display: flex; align-items: center; gap: 10px; max-width: 680px; margin-top: 26px; padding: 8px 8px 8px 20px; border-radius: 999px; background: rgba(255,255,255,.96); box-shadow: 0 24px 50px -24px rgba(20,0,8,.6); }
.search-hero > .ic { width: 22px; height: 22px; color: var(--gold); flex: none; }
.search-hero input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 17px/1.4 var(--font); color: var(--ink); }
.search-hero input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-hero .btn { flex: none; }
.search-hero:focus-within { box-shadow: 0 0 0 3px rgba(232,193,114,.7), 0 24px 50px -24px rgba(20,0,8,.6); }
.search-hero--light { margin: 30px auto 0; border: 1px solid var(--line); box-shadow: 0 20px 40px -28px rgba(60,20,10,.45); }
.search-hero__hint { margin-top: 14px; font-size: 14px; color: rgba(255,255,255,.75); }
.search-hero__hint a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.search-summary { text-align: center; color: var(--muted); margin: 0 0 34px; }
.search-summary b { color: var(--red-2); }
.search-group + .search-group { margin-top: 56px; }
.search-group__title { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 22px; }
.search-group__title .ic { width: 24px; height: 24px; color: var(--gold); }
.search-group__title span { margin-left: 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--red-2); background: rgba(201,32,88,.08); }
.search-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.search-list__item { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: box-shadow .35s, transform .35s var(--ease); }
.search-list__item:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.search-list__item img { width: 92px; height: 70px; border-radius: 12px; object-fit: cover; flex: none; }
.search-list__ic { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 16px; background: var(--cream-2); color: var(--gold); flex: none; }
.search-list__ic .ic { width: 28px; height: 28px; }
.search-list__item b { display: block; font-size: 16px; }
.search-list__item small { display: block; margin-top: 4px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.search-list__item > .ic:last-child { width: 20px; height: 20px; margin-left: auto; flex: none; color: var(--red-2); }
.search-list mark, .search-group mark { background: rgba(232,193,114,.55); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty__label { text-align: center; font-weight: 700; color: var(--brown); margin: 0 0 14px; }
.search-empty__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 54px; }
.search-empty__chips a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(201,151,63,.45); background: #fff; font-weight: 600; color: var(--red-2); transition: background .3s, color .3s; }
.search-empty__chips a .ic { width: 18px; height: 18px; color: var(--gold); }
.search-empty__chips a:hover { background: var(--red-2); color: #fff; }

/* ---------- 404 ---------- */
.nf { position: relative; isolation: isolate; overflow: hidden; padding: clamp(60px, 9vw, 120px) 0 clamp(40px, 6vw, 70px); text-align: center;
  background: radial-gradient(60% 70% at 50% 30%, #fff3d6, transparent 70%), linear-gradient(180deg, #fbf3e4, var(--cream)); }
.nf canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.nf__code { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 24px); font-size: clamp(110px, 18vw, 220px); font-weight: 800; line-height: .9; letter-spacing: -.04em;
  background: linear-gradient(180deg, #d71c5a, #7e1135); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf__code span { display: inline-block; }
.nf__logo { width: .9em; height: auto; aspect-ratio: 1230 / 960; filter: drop-shadow(0 16px 26px rgba(60,40,140,.25)); }
.nf__title { margin: 26px 0 0; font-size: clamp(28px, 4vw, 46px); font-weight: 800; letter-spacing: -.02em; }
.nf__title em { font-family: var(--serif); font-weight: 600; color: var(--brown); }
.nf__lead { max-width: 560px; margin: 14px auto 0; color: var(--muted); font-size: 17px; }
.nf__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.nf-more { padding-top: 30px; }
.nf-more__label { text-align: center; font-weight: 700; color: var(--brown); margin: 0 0 20px; }

@media (max-width: 760px) {
  .search-hero { border-radius: 20px; flex-wrap: wrap; padding: 10px 10px 10px 16px; }
  .search-hero input { flex: 1 1 60%; }
  .search-hero .btn { width: 100%; justify-content: center; }
  .search-list { grid-template-columns: 1fr; }
}
.filters[hidden] { display: none; }

/* ---------- Tin tức: lưới / danh sách ---------- */
.news-grid--page .ncard--wide { grid-column: 1 / -1; }
.news-grid.is-list { grid-template-columns: 1fr; gap: 18px; }
.news-grid.is-list .ncard, .news-grid.is-list .ncard--wide { flex-direction: row; }
.news-grid.is-list .ncard__media, .news-grid.is-list .ncard--wide .ncard__media { width: 34%; flex: none; aspect-ratio: auto; min-height: 210px; }
.news-grid.is-list .ncard__body, .news-grid.is-list .ncard--wide .ncard__body { padding: 24px 28px; justify-content: center; }
.news-grid.is-list .ncard--wide h3 { font-size: 21px; }
@media (max-width: 1024px) and (min-width: 761px) { .news-grid--page:not(.is-list) .ncard--wide .ncard__media { width: 50%; } }
@media (max-width: 760px) {
  .news-grid.is-list .ncard, .news-grid.is-list .ncard--wide { flex-direction: column; }
  .news-grid.is-list .ncard__media, .news-grid.is-list .ncard--wide .ncard__media { width: 100%; min-height: 0; aspect-ratio: 16 / 10; }
  .news-grid.is-list .ncard__body { padding: 20px; }
}

/* ---------- Tin tức: thanh công cụ một hàng ---------- */
.section--list { padding-top: clamp(28px, 4vw, 48px); }
.news-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px 18px; flex-wrap: wrap; margin-bottom: 30px; }
.news-toolbar .filters { margin: 0; box-shadow: 0 14px 30px -24px rgba(60,20,10,.45); }
.news-toolbar .filters__btn { padding: 11px 24px; }
.news-toolbar__tools { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; justify-content: flex-end; }
.news-search { display: flex; align-items: center; gap: 8px; flex: 0 1 300px; min-width: 200px; height: 48px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .3s, box-shadow .3s; cursor: text; }
.news-search .ic { width: 18px; height: 18px; color: var(--red-2); flex: none; }
.news-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 14px/1.4 var(--font); color: var(--ink); }
.news-search input::placeholder { color: var(--muted); opacity: .8; }
.news-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.news-search:focus-within { border-color: rgba(201,151,63,.8); box-shadow: 0 0 0 3px rgba(232,193,114,.3); }
.news-toolbar .dropdown__btn { background: #fff; }
.news-toolbar .dropdown__btn > .ic:first-child { display: none; }
.news-toolbar .dropdown__label { min-width: 110px; }
.news-toolbar .view-switch { background: #fff; }
.news-empty { grid-column: 1 / -1; padding: 50px 20px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed rgba(201,151,63,.5); border-radius: 20px; }
.news-empty b { display: block; margin-bottom: 6px; font-size: 18px; color: var(--ink); }

/* bài nổi bật dạng ngang */
.news-grid--page:not(.is-list) .ncard--wide { flex-direction: row; min-height: 340px; border-color: rgba(201,151,63,.28); box-shadow: 0 24px 50px -36px rgba(60,20,10,.5); }
.news-grid--page:not(.is-list) .ncard--wide .ncard__media { width: 48%; aspect-ratio: auto; }
.news-grid--page .ncard--wide .ncard__tag { background: linear-gradient(120deg, var(--red-2), var(--red)); color: #fff; box-shadow: 0 8px 18px -10px var(--red); }
.news-grid--page .ncard--wide .ncard__body { position: relative; isolation: isolate; overflow: hidden; padding: clamp(28px, 3.4vw, 48px); justify-content: center; gap: 14px;
  background: linear-gradient(160deg, #fff 30%, #fdf6e8); }
.news-grid--page .ncard--wide .ncard__body::after { content: ''; position: absolute; right: -10px; bottom: -6px; z-index: -1; width: 78%; height: 46%; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 140' preserveAspectRatio='none'%3E%3Cpath d='M0 140C120 120 240 96 400 30V140Z' fill='%23f6e7c8' opacity='.55'/%3E%3Cpath d='M20 140C150 116 270 88 400 46' fill='none' stroke='%23e2bd73' stroke-width='1.6' opacity='.8'/%3E%3Cpath d='M90 140C200 120 300 96 400 70' fill='none' stroke='%23e2bd73' stroke-width='1' opacity='.55'/%3E%3C/svg%3E") no-repeat right bottom / 100% 100%; }
.news-grid--page .ncard--wide .ncard__date { color: var(--red-2); font-size: 15px; }
.news-grid--page .ncard--wide h3 { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.3; letter-spacing: -.01em; }
.news-grid--page .ncard--wide p { font-size: 15.5px; -webkit-line-clamp: 3; max-width: 46ch; }
.news-grid--page .ncard--wide .link-arrow { margin-top: 18px; color: var(--red-2); font-weight: 700; }

@media (max-width: 1100px) {
  .news-toolbar .filters { width: 100%; justify-content: center; }
  .news-toolbar__tools { justify-content: center; }
  .news-search { flex: 1 1 260px; }
}
@media (max-width: 760px) {
  .news-toolbar .filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; border-radius: 999px; }
  .news-toolbar .filters::-webkit-scrollbar { display: none; }
  .news-toolbar .filters__btn { flex: none; padding: 9px 16px; }
  .news-toolbar__tools { flex-wrap: wrap; }
  .news-search { flex: 1 1 100%; }
  .news-toolbar .dropdown { flex: 1; }
  .news-grid--page:not(.is-list) .ncard--wide { flex-direction: column; min-height: 0; }
  .news-grid--page:not(.is-list) .ncard--wide .ncard__media { width: 100%; aspect-ratio: 16 / 10; }
}
@media (max-width: 420px) {
  .news-toolbar .filters { gap: 2px; }
  .news-toolbar .filters__btn { flex: 1 0 auto; padding: 9px 11px; justify-content: center; }
}

/* ==========================================================================
   PAGE HERO — component dùng chung cho trang nội bộ
   Tùy chỉnh bằng biến CSS trên .page-hero (inline style hoặc class biến thể):
     --ph-h          chiều cao tối thiểu      --ph-silk-h     chiều cao dải lụa
     --ph-ov-1/2/3   màu overlay trái→phải    --ph-content-bg màu nền nội dung bên dưới
   Tắt chuyển động: thêm data-animate="off" vào <section class="page-hero">.
   Lớp: ảnh nền (-2) → overlay (-1) → hạt sáng canvas (-1) → nội dung (1) → dải lụa (0, nằm dưới nội dung)
   ========================================================================== */
.page-hero {
  --ph-h: clamp(320px, 27vw, 400px);
  --ph-silk-h: clamp(100px, 10vw, 150px);
  --ph-ov-1: rgba(30, 20, 44, .92);   /* tím than (logo) bên trái → đỏ son nhạt dần bên phải */
  --ph-ov-2: rgba(62, 26, 60, .66);
  --ph-ov-3: rgba(176, 30, 78, .16);
  --ph-content-bg: var(--cream);
  display: flex; align-items: center; min-height: var(--ph-h);
  padding: 44px 0 calc(var(--ph-silk-h) * .62 + 20px);
  background: var(--plum-deep);
}
.page-hero--tall { --ph-h: clamp(380px, 33vw, 480px); }
.page-hero > .container { position: relative; z-index: 1; }
.page-hero::before { background:
  linear-gradient(90deg, var(--ph-ov-1) 0%, var(--ph-ov-2) 42%, var(--ph-ov-3) 100%),
  linear-gradient(0deg, rgba(60, 4, 14, .45), transparent 45%); }
.page-hero__bg { overflow: hidden; }
.page-hero__bg img { position: absolute; left: 0; top: -10%; height: 120%; will-change: transform; }
.page-hero h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.12; }
.page-hero .crumbs { margin-bottom: 14px; }

.page-hero__silk { position: absolute; left: 0; bottom: -1px; width: 100%; height: var(--ph-silk-h); z-index: 0; pointer-events: none; }
.page-hero__silk-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.page-hero__silk-svg--m { display: none; }
.page-hero__silk .silk-gold { filter: drop-shadow(0 2px 3px rgba(80, 20, 0, .35)); }
.page-hero__silk .silk-sweep { mix-blend-mode: screen; }
.page-hero__mote { position: absolute; left: var(--x); top: var(--y); width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #FFF2BC 0 30%, #FFD875 45%, rgba(255, 216, 117, 0) 72%); box-shadow: 0 0 10px 2px rgba(255, 216, 117, .55); }

@media (max-width: 1024px) { .page-hero { --ph-silk-h: clamp(64px, 9vw, 90px); } }
@media (max-width: 760px) {
  .page-hero { --ph-h: 300px; --ph-silk-h: 66px; --ph-ov-1: rgba(30, 20, 44, .9); --ph-ov-2: rgba(56, 24, 56, .78); --ph-ov-3: rgba(120, 28, 66, .5); padding-top: 36px; }
  .page-hero--tall { --ph-h: 340px; }
  .page-hero__silk-svg--d { display: none; }
  .page-hero__silk-svg--m { display: block; }
  .page-hero__mote:nth-of-type(n+8) { display: none; }
}
/* không chuyển động: hạt sáng hiện tĩnh, vệt quét ẩn */
@media (prefers-reduced-motion: reduce) {
  .page-hero__mote { opacity: .7; }
  .page-hero__silk .silk-sweep { display: none; }
}
.page-hero[data-animate="off"] .page-hero__mote { opacity: .7; }
.page-hero[data-animate="off"] .silk-sweep { display: none; }

/* Mobile: thanh công cụ tin tức dính dưới header (header thu gọn còn 60px khi cuộn) */
@media (max-width: 760px) {
  .news-toolbar { position: sticky; top: 60px; z-index: 40; margin-inline: calc(50% - 50vw); padding: 8px calc(50vw - 50%);
    transition: background-color .35s, box-shadow .35s, backdrop-filter .35s; }
  .news-toolbar.is-stuck { background: rgba(251, 246, 238, .9); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 1px 0 var(--line), 0 16px 26px -22px rgba(60, 20, 10, .5); gap: 8px; }
  .news-toolbar.is-stuck .news-search:not(:focus-within):has(input:placeholder-shown) { display: none; }
  .news-toolbar.is-stuck .news-toolbar__tools { gap: 8px; }
  .news-toolbar.is-stuck .dropdown__btn { min-height: 42px; padding-block: 3px; }
  .news-toolbar.is-stuck .view-switch__btn { height: 32px; }
  .news-toolbar.is-stuck .view-switch__glider { height: 32px; }
  .news-toolbar.is-stuck .filters { box-shadow: none; }
}

/* ---------- Trang dự án: khối lọc (tab + thanh công cụ) ---------- */
.prj-bar .filters { margin-bottom: 0; }
.prj-bar .prj-toolbar { margin: 18px 0 30px; }
@media (max-width: 760px) {
  /* dính dưới header khi cuộn, tab nằm trên một hàng cuộn ngang */
  .prj-bar { position: sticky; top: 60px; z-index: 40; margin: 0 calc(50% - 50vw) 24px; padding: 8px calc(50vw - 50%);
    transition: background-color .35s, box-shadow .35s; }
  .prj-bar .filters { width: 100%; flex-wrap: nowrap; justify-content: flex-start; gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: 999px; box-shadow: 0 12px 26px -22px rgba(60,20,10,.45); }
  .prj-bar .filters::-webkit-scrollbar { display: none; }
  .prj-bar .filters__btn { flex: none; padding: 9px 14px; white-space: nowrap; }
  .prj-bar .prj-toolbar { margin: 10px 0 0; }
  .prj-bar.is-stuck { background: rgba(251, 246, 238, .9); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 1px 0 var(--line), 0 16px 26px -22px rgba(60, 20, 10, .5); }
  .prj-bar.is-stuck .filters { box-shadow: none; }
  .prj-bar.is-stuck .prj-toolbar { margin-top: 8px; padding: 0; border: 0; background: none; box-shadow: none; }
  .prj-bar.is-stuck .prj-toolbar__count { display: none; }
  .prj-bar.is-stuck .dropdown__btn { min-height: 42px; padding-block: 3px; }
  .prj-bar.is-stuck .view-switch__btn, .prj-bar.is-stuck .view-switch__glider { height: 32px; }
}

/* ===== Bổ sung cho bản CMS (Themes/QuyAnSinh) ===== */
/* Tab lọc là link thật (aria-current) thay cho button (aria-selected) */
a.filters__btn { text-decoration: none; }
.filters .filters__btn[aria-current="page"], .filters .filters__btn[aria-current="page"]:hover { color: #fff; }
.filters__btn:hover:not([aria-current="page"]) { color: var(--red-2); }
.filters:not(.has-glider) .filters__btn[aria-current="page"] { background: linear-gradient(120deg, var(--red-2), var(--red)); }
.prj-empty { text-align: center; color: var(--muted); padding: 60px 20px; border: 1px dashed var(--line); border-radius: 22px; background: #fff; }

/* Phân trang */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.pager__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; transition: background .3s, color .3s, border-color .3s; }
a.pager__btn:hover { border-color: var(--red-2); color: var(--red-2); }
.pager__btn.is-current { background: linear-gradient(120deg, var(--red-2), var(--red)); border-color: transparent; color: #fff; }
.pager__btn.is-disabled { opacity: .4; }
.pager__btn .ic { width: 18px; height: 18px; }
.pager__prev { transform: rotate(180deg); }
.pager__gap { align-self: center; color: var(--muted); padding: 0 4px; }

/* Chi tiết dự án: nội dung từ trình soạn thảo, gallery, tiến độ */
.prose__content > * + * { margin-top: 18px; }
.prose__content img { max-width: 100%; height: auto; border-radius: 16px; }
.prose__content h2 { font-size: 26px; color: var(--red-2); margin-top: 36px; }
.prose__content h3 { font-size: 21px; margin-top: 28px; }
.prose__content ul, .prose__content ol { padding-left: 22px; }
.prose__content ul { list-style: disc; }
.prose__content ol { list-style: decimal; }
.prose__content a { color: var(--red-2); text-decoration: underline; text-underline-offset: 3px; }
.prose__content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose__content td, .prose__content th { border: 1px solid var(--line); padding: 8px 10px; }
.qas-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.qas-gallery__item { display: block; overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 3; }
.qas-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.qas-gallery__item:hover img { transform: scale(1.06); }
.qas-progress__num { font-size: 18px; color: var(--gold-2, var(--gold)); font-family: var(--font); margin-left: 6px; }
.qas-progress { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 14px 0 26px; }
.qas-progress i { display: block; width: var(--p); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red-2), var(--gold)); }
.qas-lightbox { max-width: min(1100px, 94vw); width: 100%; padding: 0; border: 0; background: transparent; overflow: visible; }
.qas-lightbox::backdrop { background: rgba(20, 6, 12, .86); }
.qas-lightbox figure { margin: 0; text-align: center; }
.qas-lightbox img { max-width: 100%; max-height: 80vh; border-radius: 14px; margin: 0 auto; }
.qas-lightbox figcaption { color: #fff; margin-top: 12px; font-size: 15px; }
.qas-lightbox__close, .qas-lightbox__nav { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.qas-lightbox__close { top: -56px; right: 0; }
.qas-lightbox__nav { top: 50%; right: -60px; transform: translateY(-50%); }
.qas-lightbox__nav--prev { left: -60px; right: auto; }
.qas-lightbox__nav--prev .ic { transform: rotate(180deg); }
@media (max-width: 760px) {
  .qas-gallery { grid-template-columns: repeat(2, 1fr); }
  .qas-lightbox__nav { top: auto; bottom: -60px; right: 30%; transform: none; }
  .qas-lightbox__nav--prev { left: 30%; right: auto; }
}
/* Bảng thông tin dự án: nhãn không bị ép xuống dòng khi giá trị dài (Chủ đầu tư, Quy mô...) */
.facts dt { flex: none; white-space: nowrap; align-self: flex-start; }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
/* Bài viết: từ khóa */
.qas-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; padding-top: 22px; border-top: 1px dashed var(--line); font-size: 14.5px; }
.qas-tags span { color: var(--muted); font-weight: 600; }
.qas-tags a { padding: 6px 14px; border-radius: 999px; background: var(--cream-2); color: var(--red-2); text-decoration: none; }
.qas-tags a:hover { background: var(--red-2); color: #fff; }
form.news-search { margin: 0; }
/* Liên hệ: captcha của CMS (Settings enable_captcha) */
.field--captcha > span { display: block; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row img { height: 44px; width: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.captcha-row__reload { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--red-2); cursor: pointer; flex: none; }
.captcha-row input { flex: 1; min-width: 0; }
.form__submit[aria-busy="true"] { opacity: .7; cursor: progress; }
/* Gallery đúng 4 ảnh → lưới 2×2 (tránh 1 ảnh lẻ ở hàng dưới) */
.qas-gallery:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
/* Bài viết: widget đọc nhiều ([mostview] — views/widgets/partials/MostViewWidget) */
.detail__side > * + * { margin-top: 22px; }
.qas-mostview__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: none; }
.qas-mostview__item { display: grid; grid-template-columns: 30px 76px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.qas-mostview__item:not(:has(img)) { grid-template-columns: 30px 1fr; }
.qas-mostview__rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--red-2); background: var(--cream-2); }
.qas-mostview__list li:first-child .qas-mostview__rank { color: #fff; background: linear-gradient(120deg, var(--red-2), var(--red)); }
.qas-mostview__item img { width: 76px; height: 56px; border-radius: 10px; object-fit: cover; }
.qas-mostview__item b { font-size: 14px; line-height: 1.45; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color .25s; }
.qas-mostview__item:hover b { color: var(--red-2); }
.qas-related .news-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .qas-related .news-grid { grid-template-columns: 1fr; } }
/* ===== Bài viết: tác giả, mục lục, tin đề xuất, nguồn, file đính kèm, dòng sự kiện, bài liên quan ===== */
.qas-byline { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-bottom: 22px; }
.qas-byline__item { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.qas-byline__item img, .qas-byline__ini { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.qas-byline__ini { display: grid; place-items: center; background: linear-gradient(120deg, var(--red-2), var(--red)); color: #fff; font-weight: 700; }
.qas-byline__item b { display: block; font-size: 15px; }
.qas-byline__item small { display: block; color: var(--muted); font-size: 13px; }
.qas-byline__item:hover b { color: var(--red-2); }

.qas-toc { margin: 22px 0 6px; border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; }
.qas-toc__head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border: 0; background: var(--cream-2); font: 700 15px/1.3 var(--font); color: var(--red-2); cursor: pointer; text-align: left; }
.qas-toc__chev { margin-left: auto; transition: transform .3s; }
.qas-toc__head[aria-expanded="false"] .qas-toc__chev { transform: rotate(-90deg); }
.qas-toc__list { margin: 0; padding: 12px 18px 16px 40px; list-style: decimal; display: grid; gap: 6px; font-size: 15px; }
.qas-toc__list li.is-sub { list-style: circle; margin-left: 18px; font-size: 14px; }
.qas-toc__list a { color: var(--ink); text-decoration: none; }
.qas-toc__list a:hover, .qas-toc__list a.is-active { color: var(--red-2); }
.qas-toc__head[aria-expanded="false"] + .qas-toc__list { display: none; }
.prose__content h2[id], .prose__content h3[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

.prose__content .qas-suggest { margin: 28px 0; padding: 16px 18px; border-left: 4px solid var(--gold); border-radius: 0 16px 16px 0; background: var(--cream-2); display: grid; gap: 12px; }
.qas-suggest__label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brown); }
.prose__content .qas-suggest__item { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.prose__content .qas-suggest__item img { width: 96px; height: 64px; border-radius: 10px; object-fit: cover; margin: 0; }
.qas-suggest__item b { font-size: 15.5px; line-height: 1.45; }
.qas-suggest__item:hover b { color: var(--red-2); }

.qas-source { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 26px; padding: 12px 16px; border-radius: 14px; background: var(--cream-2); font-size: 14.5px; color: var(--muted); }
.qas-source .ic { color: var(--gold); }
.qas-source b { color: var(--ink); }
.qas-source a { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--red-2); font-weight: 600; text-decoration: none; }

.qas-files, .qas-timeline-box, .qas-related-list { margin-top: 26px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.qas-files h3, .qas-timeline-box h3, .qas-related-list h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 18px; color: var(--red-2); }
.qas-files ul, .qas-timeline-box ol, .qas-related-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qas-files a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--cream); color: var(--ink); text-decoration: none; font-size: 15px; transition: background .25s; }
.qas-files a:hover { background: var(--cream-2); color: var(--red-2); }
.qas-files a > .ic { margin-left: auto; transform: rotate(90deg); color: var(--red-2); }
.qas-files__ext { flex: none; min-width: 44px; padding: 4px 6px; border-radius: 8px; background: var(--red-2); color: #fff; font-size: 11px; font-weight: 800; text-align: center; }
.qas-timeline-box h3 a { color: var(--ink); text-decoration: none; }
.qas-timeline-box h3 a:hover { color: var(--red-2); }
.qas-timeline-box li { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding-left: 16px; font-size: 15px; }
.qas-timeline-box li::before { content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.qas-timeline-box time { color: var(--brown); font-weight: 700; font-size: 13.5px; padding-top: 2px; }
.qas-timeline-box a, .qas-related-list a { color: var(--ink); text-decoration: none; }
.qas-timeline-box a:hover, .qas-related-list a:hover b { color: var(--red-2); }
.qas-related-list a { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.qas-related-list img { width: 110px; height: 72px; border-radius: 12px; object-fit: cover; }
.qas-related-list b { display: block; font-size: 15.5px; line-height: 1.45; }
.qas-related-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
/* Mục lục: chỉ đánh số mục h2 (h3 là mục con, không chiếm số) */
.qas-toc__list { list-style: none; padding-left: 18px; counter-reset: toc; }
.qas-toc__list li:not(.is-sub) { counter-increment: toc; }
.qas-toc__list li:not(.is-sub)::before { content: counter(toc) ". "; color: var(--muted); }
.qas-toc__list li.is-sub { list-style: none; margin-left: 22px; }
.qas-toc__list li.is-sub::before { content: "– "; color: var(--muted); }
/* ===== Bài viết: thanh công cụ (chia sẻ, cỡ chữ, in) ===== */
.qas-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 18px; margin: 0 0 22px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.qas-tools__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qas-tools__label { font-size: 13.5px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.qas-tools__btn { display: inline-grid; place-items: center; grid-auto-flow: column; gap: 6px; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--red-2); font: 700 14px/1 var(--font); text-decoration: none; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease); }
.qas-tools__btn:hover:not(:disabled) { background: var(--red-2); border-color: var(--red-2); color: #fff; transform: translateY(-2px); }
.qas-tools__btn:disabled { opacity: .4; cursor: default; }
.qas-tools__btn[aria-pressed="true"] { background: var(--cream-2); border-color: var(--gold); }
.qas-tools__btn--text { font-size: 14px; }
.qas-tools__btn--big { font-size: 16px; }
.qas-tools__btn--print { padding: 0 14px; }
.qas-tools__btn .ic { width: 17px; height: 17px; }

/* Cỡ chữ: --qas-fs (0.9 – 1.3) do qas-pages.js đặt trên .detail__main */
.detail__main.prose { font-size: calc(17px * var(--qas-fs, 1)); }
.detail__main .prose__lead { font-size: calc(20px * var(--qas-fs, 1)); }
.detail__main .prose__content h2 { font-size: calc(26px * var(--qas-fs, 1)); }
.detail__main .prose__content h3 { font-size: calc(21px * var(--qas-fs, 1)); }
.detail__main .prose__content blockquote { font-size: calc(22px * var(--qas-fs, 1)); }

/* ===== In bài viết: chỉ giữ tiêu đề, thông tin và thân bài ===== */
@media print {
  .topbar, .site-header, .drawer, .drawer-backdrop, .site-footer, .toast, .detail__side, .qas-related,
  .qas-tools, .qas-toc, .qas-suggest, .page-hero__bg, .page-hero canvas, .page-hero__silk, .crumbs, .pager,
  .qas-related-list, .socials, .skip-link { display: none !important; }
  .page-hero::before, .page-hero::after { display: none !important; }
  /* Dự án: giữ bảng "Thông tin dự án" (in sau thân bài), bỏ nút đồng hành, dự án liên quan, lightbox */
  .page-project .detail__side { display: block !important; margin-top: 18px; }
  .page-project .facts { box-shadow: none !important; break-inside: avoid; }
  .page-project .facts__cta, .page-project .section--cream, .qas-lightbox { display: none !important; }
  .qas-gallery { grid-template-columns: repeat(4, 1fr) !important; }
  html, body { background: #fff !important; color: #000; }
  .page-hero { min-height: 0 !important; padding: 0 0 12px !important; background: none !important; color: #000 !important; }
  .page-hero h1, .page-hero .page-hero__lead, .page-hero .pill { color: #000 !important; text-shadow: none !important; background: none !important; border: 0 !important; padding: 0 !important; }
  .section { padding: 0 !important; }
  .detail { display: block !important; }
  .detail__main.prose { font-size: 12pt; }
  .prose__content a { color: #000; text-decoration: underline; }
  .prose__content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .prose__content img, .prose figure { break-inside: avoid; max-width: 100% !important; }
  h2, h3 { break-after: avoid; }
  [data-reveal], [data-stagger] > *, [data-hero-in] { opacity: 1 !important; transform: none !important; }
}
/* ===== Dòng sự kiện (qas/timeline/show, archive) ===== */
.qas-tl { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 22px; }
.qas-tl::before { content: ''; position: absolute; left: 118px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--gold), var(--line)); }
.qas-tl__item { display: grid; grid-template-columns: 100px 1fr; gap: 36px; position: relative; }
.qas-tl__item::before { content: ''; position: absolute; left: 112px; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--red-2); box-shadow: 0 0 0 4px var(--cream); }
.qas-tl__date { text-align: right; padding-top: 2px; }
.qas-tl__date b { display: block; font-size: 22px; line-height: 1.1; color: var(--red-2); }
.qas-tl__date small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.qas-tl__card { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); text-decoration: none; transition: box-shadow .35s, transform .35s var(--ease); }
.qas-tl__card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.qas-tl__media { display: block; overflow: hidden; border-radius: 14px; aspect-ratio: 16 / 10; }
.qas-tl__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.qas-tl__card:hover .qas-tl__media img { transform: scale(1.06); }
.qas-tl__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qas-tl__cat { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brown); }
.qas-tl__body b { font-size: 17px; line-height: 1.4; }
.qas-tl__card:hover b { color: var(--red-2); }
.qas-tl__body small { font-size: 14px; line-height: 1.6; color: var(--muted); }
.qas-tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.qas-tl-list a { display: block; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; transition: background .25s; }
.qas-tl-list a:hover { background: var(--cream-2); }
.qas-tl-list b { display: block; font-size: 15px; }
.qas-tl-list a:hover b { color: var(--red-2); }
.qas-tl-list small { color: var(--muted); font-size: 13px; }
.qas-tl-list__all { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 600; color: var(--red-2); text-decoration: none; }
.qas-tl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.qas-tl-cardx { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; color: var(--ink); text-decoration: none; transition: box-shadow .35s, transform .35s var(--ease); }
.qas-tl-cardx:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.qas-tl-cardx__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--cream-2); }
.qas-tl-cardx__media img { width: 100%; height: 100%; object-fit: cover; }
.qas-tl-cardx__ph { display: grid; place-items: center; height: 100%; color: var(--gold); }
.qas-tl-cardx__ph .ic { width: 48px; height: 48px; }
.qas-tl-cardx__body { display: grid; gap: 6px; padding: 18px 20px 22px; }
.qas-tl-cardx__body small { color: var(--brown); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.qas-tl-cardx__body b { font-size: 18px; }
.qas-tl-cardx:hover b { color: var(--red-2); }
.qas-tl-cardx__body em { font-style: normal; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
@media (max-width: 900px) {
  .qas-tl-grid { grid-template-columns: 1fr 1fr; }
  .qas-tl__card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .qas-tl::before { left: 6px; }
  .qas-tl__item { grid-template-columns: 1fr; gap: 8px; padding-left: 26px; }
  .qas-tl__item::before { left: 0; }
  .qas-tl__date { text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .qas-tl__date small { margin: 0; }
  .qas-tl-grid { grid-template-columns: 1fr; }
}
/* ===== Trang tác giả ===== */
.prj-grid--2, .news-grid--2 { grid-template-columns: repeat(2, 1fr) !important; }
.qas-author__head { display: flex; align-items: center; gap: 14px; }
.qas-author__head img, .qas-author__ini { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.qas-author__ini { font-size: 28px; }
.qas-author__head b { display: block; font-size: 19px; color: var(--ink); }
.qas-author__head small { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.qas-author__bio { margin: 16px 0 0; font-size: 14.5px; line-height: 1.7; color: #4a4450; }
.qas-author__links { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.qas-author__links a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--red-2); text-decoration: none; word-break: break-all; }
@media (max-width: 760px) { .prj-grid--2, .news-grid--2 { grid-template-columns: 1fr !important; } }
/* Thanh công cụ: desktop hiện cả cụm chia sẻ; mobile (≤ 600px) gọn thành nút dropdown, các nút cùng một hàng */
.qas-tools__share { position: relative; }
.qas-tools__share-list { display: flex; flex-wrap: wrap; gap: 8px; }
.qas-tools__share-toggle { display: none; padding: 0 14px; }
@media (max-width: 600px) {
  .qas-tools { flex-wrap: nowrap; gap: 8px; }
  .qas-tools__group { flex-wrap: nowrap; gap: 6px; }
  .qas-tools__label { display: none; }
  .qas-tools__share-toggle { display: inline-grid; }
  .qas-tools__btn { min-width: 36px; height: 36px; padding: 0 9px; }
  .qas-tools__btn--print { padding: 0 11px; }
  .qas-tools__share-list { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; display: grid; grid-template-columns: repeat(5, auto); gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s; }
  .qas-tools__share.is-open .qas-tools__share-list { opacity: 1; visibility: visible; transform: none; }
  .qas-tools__share.is-open .qas-tools__share-toggle { background: var(--red-2); border-color: var(--red-2); color: #fff; }
}
