/* ============================================================
   home.css —— 首页：站头 + 题目目录卡
   ============================================================ */

.home {
  max-width: var(--w-wrap);
  margin: 0 auto;
  padding: 22px 16px 40px;
}

@media (min-width: 760px) {
  .home {
    padding: 40px 28px 64px;
  }
}

/* ---------- 站头 ---------- */
.home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 26px;
}

@media (min-width: 760px) {
  .home-head {
    align-items: flex-end;
    padding-bottom: 40px;
  }
}

.home-head__text {
  min-width: 0;
}

.home-title {
  margin: 0 0 8px;
  max-width: 12ch;
}

.home-sub {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- 题目目录 ---------- */
.q-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .q-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 1080px) {
  .q-grid {
    grid-template-columns: repeat(3, minmax(320px, 1fr));
  }
}

/* 题目只有一道时保持单列宽卡，右侧不留空档 */
@media (min-width: 760px) {
  .q-grid--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
  }
}

.q-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 20px 20px 16px;
  background: var(--surface);
  border-radius: var(--r-frame);
  transition: background-color 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.q-card:hover {
  background: var(--surface-2);
}

@media (hover: hover) and (pointer: fine) {
  .q-card:hover {
    transform: translateY(-3px);
  }
}

.q-card:active {
  transform: translateY(0);
}

.q-card__title {
  font-size: clamp(19px, 4.6vw, 21px);
  line-height: 1.35;
}

.q-card__prompt {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.72;
}

.q-card__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}

.q-card__stars {
  letter-spacing: 2px;
  color: var(--accent-3);
  font-size: 13px;
  line-height: 1;
}

.q-card__arrow {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--accent);
  transition: transform 0.18s ease;
}

.q-card:hover .q-card__arrow {
  transform: translateX(3px);
}

/* ---------- 空态 / 页脚 ---------- */
.q-empty {
  padding: 48px 20px;
  background: var(--surface);
  border-radius: var(--r-frame);
  color: var(--ink-soft);
  text-align: center;
}

.home-foot {
  margin-top: 34px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}
