/* Q&A hub — trang danh sách câu hỏi /hoi-dap.
   Token canonical từ tokens.css (DESIGN.md). KHÔNG hardcode hex/spacing/radius.
   Brand = xanh lá var(--accent). Mobile-first → header hàng ngang + card nở ở màn
   rộng. Card style bám trang chi tiết qa.css cho nhất quán (radius --r-md, viền
   var(--border), nền var(--surface), meta dùng .mono cho số liệu). */

.qahub {
  max-width: 760px;
  margin: 0 auto;
}

/* ===== Header: kicker + tiêu đề + mô tả + nút đặt câu hỏi ===== */
.qahub-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: var(--space-xl, 24px);
}
.qahub-head-text { min-width: 0; }
.qahub-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--accent);
}
.qahub-kicker-ic {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
}
.qahub-kicker-ic .fa-icon { width: 13px; height: 13px; }
.qahub-title {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 0;
  text-align: left;
}
.qahub-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 56ch;
}
.qahub-ask {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: filter var(--duration-fast, 150ms) ease, transform var(--duration-fast, 150ms) ease;
}
.qahub-ask:hover { filter: brightness(1.06); }
.qahub-ask:active { transform: translateY(1px); }
.qahub-ask:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qahub-ask .fa-icon { width: 1.05em; height: 1.05em; }

@media (min-width: 640px) {
  .qahub-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
  }
  .qahub-ask { align-self: flex-end; flex: none; }
}

/* ===== Danh sách câu hỏi ===== */
.qahub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qahub-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 16px 18px;
  transition: border-color var(--duration-fast, 150ms) ease, box-shadow var(--duration-fast, 150ms) ease;
}
.qahub-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.qahub-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.005em;
  margin: 0 0 6px;
  text-align: left;
}
.qahub-card-title a {
  color: var(--text);
  text-decoration: none;
}
.qahub-card-title a:hover { color: var(--accent); }
.qahub-card-title a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.qahub-card-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Hàng meta ===== */
.qahub-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.qahub-author { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.qahub-author-name {
  font-weight: 600;
  color: var(--text);
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qahub-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  object-fit: cover;
  flex: none;
  background: var(--surface-3);
}
.qahub-avatar.qa-avatar-fb { display: grid; place-items: center; color: var(--faint); }
.qahub-avatar.qa-avatar-fb .fa-icon { width: 55%; height: 55%; }
.qahub-meta-sep { color: var(--faint); }
.qahub-stat { display: inline-flex; align-items: center; gap: 5px; }
.qahub-ic { width: 15px; height: 15px; color: var(--faint); }
.qahub-stat .mono { color: var(--text); font-weight: 600; }
.qahub-stat-label { color: var(--muted); }
.qahub-time { color: var(--muted); white-space: nowrap; }
.qahub-model {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  margin-left: auto;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--duration-fast, 150ms) ease, color var(--duration-fast, 150ms) ease;
}
a.qahub-model:hover { background: var(--accent); color: var(--on-accent); }
a.qahub-model:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qahub-model-ic { width: 13px; height: 13px; }

/* ===== Xem thêm (keyset) ===== */
.qahub-more { margin-top: 18px; text-align: center; }
.qahub-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--duration-fast, 150ms) ease, color var(--duration-fast, 150ms) ease, background var(--duration-fast, 150ms) ease;
}
.qahub-more-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.qahub-more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Rỗng ===== */
.qahub-empty {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.qahub-empty-ic {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
}
.qahub-empty-ic .fa-icon { width: 22px; height: 22px; }
.qahub-empty-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.qahub-empty-text { font-size: 14px; color: var(--muted); margin: 0; }
