/* ShelfAnswers layout (2026-10-16): thư viện hỏi đáp. Nạp sau theme.css + site.css. */
.lay-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ast-ink); font-family: var(--ast-heading-font); }
.lay-logo__mark svg { width: 54px; height: 54px; display: block; }
.lay-logo__word { font-weight: 700; font-size: 2.1rem; letter-spacing: -.01em; line-height: 1; }
.lay-logo__word b { color: var(--ast-accent); font-weight: 800; }
.lay-logo--footer { color: #fff; }
.lay-logo--footer .lay-logo__word b { color: var(--ast-highlight); }

.lay-disclosure--top { background: var(--ast-dark); color: color-mix(in srgb, #fff 78%, transparent); }
.lay-mast { position: relative; box-shadow: none; border-bottom: 3px double var(--ast-line); }
.lay-mast__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 12px; }
.lay-mast__brand { grid-column: 2; text-align: center; }
.lay-mast__tag { margin: .35em 0 0; font-size: .82rem; color: var(--ast-muted); font-style: italic; font-family: var(--ast-heading-font); }
.lay-mast__search { grid-column: 3; justify-self: end; width: min(260px, 100%); }
.lay-mast .ast-nav-toggle { grid-column: 1; justify-self: start; }
.lay-mast__nav { background: transparent; color: var(--ast-ink); border-top: 1px solid var(--ast-line); }
.lay-mast__nav .ast-nav__inner { justify-content: center; }
.lay-mast__nav .ast-menu { justify-content: center; }
.lay-mast__nav .ast-menu > li > a { font-family: var(--ast-heading-font); font-weight: 600; font-size: 1rem; padding: .75em 1em; }
.lay-mast__nav .ast-menu > li > a:hover, .lay-mast__nav .current-menu-item > a { background: var(--ast-soft); }
.lay-mast__nav .ast-menu--right { margin-left: 8px; }

.lay-h { margin: 0 0 .6em; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }

/* hỏi */
.lay-ask { background: radial-gradient(ellipse at top, var(--ast-accent-soft), var(--ast-bg) 70%); padding: clamp(44px, 7vw, 92px) 0 clamp(36px, 5vw, 64px); text-align: center; }
.lay-ask__inner { max-width: 820px; }
.lay-ask__eyebrow { margin: 0 0 .8em; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ast-accent); }
.lay-ask__title { margin: 0 0 .35em; font-size: clamp(2.2rem, 1.6rem + 3vw, 3.6rem); }
.lay-ask__text { margin: 0 auto 1.6em; max-width: 640px; color: var(--ast-muted); font-size: 1.08rem; }
.lay-ask__form { display: flex; max-width: 640px; margin: 0 auto; background: #fff; border: 2px solid var(--ast-accent); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(20, 27, 45, .1); }
.lay-ask__form input { flex: 1; min-width: 0; border: 0; padding: 1em 1.2em; font: inherit; font-size: 1.05rem; color: var(--ast-ink); background: transparent; }
.lay-ask__form input:focus { outline: none; }
.lay-ask__form button { border: 0; background: var(--ast-accent); color: #fff; padding: 0 1.3em; cursor: pointer; display: flex; align-items: center; }
.lay-ask__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; font-size: .9rem; }
.lay-ask__chips span { color: var(--ast-muted); padding: .35em 0; }
.lay-ask__chips a { padding: .35em .9em; border-radius: 999px; background: #fff; border: 1px solid var(--ast-line); color: var(--ast-ink); text-decoration: none; }
.lay-ask__chips a:hover { border-color: var(--ast-accent); color: var(--ast-accent); }

/* kệ gáy sách */
.lay-shelves { padding: clamp(36px, 5vw, 60px) 0; }
.lay-spines { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-bottom: 10px solid #6B4F35; border-radius: 0 0 4px 4px; padding: 0 6px; background: linear-gradient(180deg, transparent 0, transparent calc(100% - 1px), rgba(0, 0, 0, .1) 100%); }
.lay-spine { padding: 20px 18px 18px; color: #fff; border-right: 3px solid rgba(255, 255, 255, .5); min-height: 220px; display: flex; flex-direction: column; border-radius: 4px 4px 0 0; margin-top: 8px; }
.lay-spine:nth-child(2n) { margin-top: 0; }
.lay-spine--0 { background: #2B3A67; } .lay-spine--1 { background: #7A3E48; } .lay-spine--2 { background: #2F5D50; } .lay-spine--3 { background: #8A5A1E; } .lay-spine--4 { background: #44396B; }
.lay-spine__name { color: #fff; text-decoration: none; font-family: var(--ast-heading-font); font-weight: 700; font-size: 1.3rem; line-height: 1.2; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 2px solid #F2B544; }
.lay-spine__name small { display: block; font-family: var(--ast-font); font-weight: 500; font-size: .78rem; opacity: .8; margin-top: 4px; }
.lay-spine ul { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.lay-spine li { margin: .35em 0; }
.lay-spine li a { color: #fff; opacity: .9; text-decoration: none; }
.lay-spine li a:hover { opacity: 1; text-decoration: underline; }

/* hỏi đáp */
.lay-qa { padding: clamp(36px, 5vw, 60px) 0; background: var(--ast-soft); }
.lay-qa__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.lay-qa__list { list-style: none; margin: 0 0 24px; padding: 0; }
.lay-qa__item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--ast-line); }
.lay-qa__q { width: 36px; height: 36px; border-radius: 50%; background: var(--ast-accent); color: #fff; font-family: var(--ast-heading-font); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.lay-qa__cat { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; }
.lay-qa__title { margin: .15em 0 .3em; font-size: 1.22rem; }
.lay-qa__title a { color: var(--ast-ink); text-decoration: none; }
.lay-qa__title a:hover { color: var(--ast-accent); text-decoration: underline; }
.lay-qa__a { margin: 0; color: var(--ast-muted); font-size: .95rem; }
.lay-qa__a::before { content: "A: "; font-weight: 800; color: var(--ast-ink); }
.lay-qa__side { position: sticky; top: 20px; background: #fff; border: 1px solid var(--ast-line); border-radius: 14px; padding: 20px; }

/* kệ theo nhóm */
.lay-row-sec { padding: clamp(28px, 4vw, 48px) 0 0; }
.lay-row-sec:last-of-type { padding-bottom: 20px; }
.lay-row-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ast-ink); margin-bottom: 20px; }
.lay-row-sec__head .lay-h { margin: 0 0 .3em; }
.lay-row-sec__head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.lay-covers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

/* archive: danh sách */
.lay-list { display: grid; gap: 0; border-top: 1px solid var(--ast-line); }
.lay-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--ast-line); align-items: center; }
.lay-row__img { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; border: 1px solid var(--ast-line); }
.lay-row__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lay-row__meta { font-size: .8rem; color: var(--ast-muted); }
.lay-row__meta a { font-weight: 700; text-decoration: none; }
.lay-row__title { margin: .2em 0 .35em; font-size: 1.3rem; }
.lay-row__title a { color: var(--ast-ink); text-decoration: none; }
.lay-row__title a:hover { color: var(--ast-accent); }
.lay-row__excerpt { margin: 0; color: var(--ast-muted); font-size: .95rem; }

/* bài viết: tiêu đề giữa kiểu sách */
.lay-shelf .ast-article__head { text-align: center; border-bottom: 3px double var(--ast-line); padding-bottom: 18px; margin-bottom: 22px; }
.lay-shelf .ast-article__head .ast-byline { justify-content: center; margin-bottom: 0; }
.lay-shelf .ast-article__head .ast-crumbs { justify-content: center; }

/* footer */
.lay-foot { padding-top: 40px; }
.lay-foot__brand { text-align: center; padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid color-mix(in srgb, #fff 12%, transparent); }
.lay-foot__brand p { max-width: 560px; margin: .8em auto 0; }
.lay-foot__grid { grid-template-columns: repeat(3, 1fr); text-align: center; }

@media (max-width: 960px) {
  .lay-qa__grid { grid-template-columns: 1fr; }
  .lay-qa__side { position: static; }
  .lay-covers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.lay-navsearch { display: none; }
@media (max-width: 760px) {
  .lay-navsearch { display: flex; width: 100%; margin: 6px 0 10px; background: #fff; }
  .lay-mast__row { grid-template-columns: auto minmax(0, 1fr) auto; padding-top: 12px; padding-bottom: 10px; gap: 10px; }
  .lay-mast__brand { grid-column: 2; }
  .lay-mast__search { display: none; }
  .lay-mast__tag { display: none; }
  .lay-ask__chips a:nth-of-type(n+4) { display: none; }
  .lay-logo__mark svg { width: 40px; height: 40px; }
  .lay-logo__word { font-size: 1.6rem; }
  .lay-mast__nav .ast-nav__inner { align-items: stretch; }
  .lay-mast__nav .ast-menu { justify-content: flex-start; }
  .lay-spines { grid-template-columns: 1fr 1fr; }
  .lay-spine { min-height: 0; margin-top: 0; }
  .lay-row { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: start; }
  .lay-row__title { font-size: 1.05rem; }
  .lay-row__excerpt { display: none; }
  .lay-foot__grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .lay-logo__word { font-size: 1.4rem; }
  .lay-logo__mark svg { width: 36px; height: 36px; }
  .lay-spines { grid-template-columns: 1fr; }
  .lay-covers { grid-template-columns: 1fr; }
}
