/* 独立样式命名空间：.hw-doc-hub，仅作用于 Code Lab 模板页面 */
.hw-doc-hub {
  --hub-ink: #1a2430;
  --hub-muted: #5f6f7b;
  --hub-paper: #ffffff;
  --hub-line: rgba(26, 36, 48, 0.12);
  --hub-bg: #eef4f8;
  color: var(--hub-ink);
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 5%, rgba(12, 130, 119, 0.18), transparent 35%),
    radial-gradient(circle at 94% 3%, rgba(220, 107, 42, 0.16), transparent 30%),
    linear-gradient(180deg, #f8fbfd 0%, var(--hub-bg) 100%);
}

.hw-doc-hub__container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.hw-doc-hub__hero {
  padding: 88px 0 30px;
}

.hw-doc-hub__kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f5a67;
  background: rgba(15, 90, 103, 0.12);
}

.hw-doc-hub h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.06;
}

.hw-doc-hub p {
  margin: 0;
  color: var(--hub-muted);
  font-size: 17px;
  line-height: 1.72;
}

.hw-doc-hub__wall {
  padding: 0 0 88px;
}

.hw-doc-hub__masonry {
  column-count: 3;
  column-gap: 16px;
}

.hw-doc-hub__card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--hub-paper);
  border: 1px solid var(--hub-line);
  border-radius: 18px;
  padding: 18px;
  margin: 0 0 16px;
  break-inside: avoid;
  box-shadow: 0 14px 30px rgba(26, 36, 48, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.hw-doc-hub__card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% -20%;
  height: 120px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.38), transparent 65%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.hw-doc-hub__card:hover,
.hw-doc-hub__card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 24px 46px rgba(26, 36, 48, 0.16);
  border-color: rgba(26, 36, 48, 0.24);
}

.hw-doc-hub__card:hover::after,
.hw-doc-hub__card:focus-visible::after {
  opacity: 1;
}

.hw-doc-hub__card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.hw-doc-hub__chip {
  display: inline-flex;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 5px 9px;
}

.hw-doc-hub__arrow {
  font-size: 18px;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.hw-doc-hub__card:hover .hw-doc-hub__arrow,
.hw-doc-hub__card:focus-visible .hw-doc-hub__arrow {
  transform: translateX(3px);
}

.hw-doc-hub h2 {
  margin: 12px 0 8px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.16;
}

.hw-doc-hub__card p {
  font-size: 15px;
}

.hw-doc-hub__card.is-ocean {
  background: linear-gradient(165deg, #ffffff 0%, #eaf8ff 130%);
}

.hw-doc-hub__card.is-ocean .hw-doc-hub__chip {
  background: rgba(33, 124, 203, 0.14);
  color: #14588f;
}

.hw-doc-hub__card.is-coral {
  background: linear-gradient(165deg, #ffffff 0%, #fff1ea 130%);
}

.hw-doc-hub__card.is-coral .hw-doc-hub__chip {
  background: rgba(200, 88, 33, 0.14);
  color: #9a3f13;
}

.hw-doc-hub__card.is-forest {
  background: linear-gradient(165deg, #ffffff 0%, #edf8ef 130%);
}

.hw-doc-hub__card.is-forest .hw-doc-hub__chip {
  background: rgba(41, 129, 74, 0.14);
  color: #1f6b3e;
}

.hw-doc-hub__card.is-amber {
  background: linear-gradient(165deg, #ffffff 0%, #fff8e9 130%);
}

.hw-doc-hub__card.is-amber .hw-doc-hub__chip {
  background: rgba(180, 120, 0, 0.14);
  color: #915f00;
}

.hw-doc-hub__card.is-slate {
  background: linear-gradient(165deg, #ffffff 0%, #f0f2f8 130%);
}

.hw-doc-hub__card.is-slate .hw-doc-hub__chip {
  background: rgba(72, 89, 124, 0.14);
  color: #334263;
}

.hw-doc-hub__empty {
  border: 1px dashed var(--hub-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  padding: 26px;
}

.hw-doc-hub__empty h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

@media (max-width: 1024px) {
  .hw-doc-hub__masonry {
    column-count: 2;
  }
}

@media (max-width: 680px) {
  .hw-doc-hub__hero {
    padding: 68px 0 24px;
  }

  .hw-doc-hub p {
    font-size: 15px;
  }

  .hw-doc-hub__masonry {
    column-count: 1;
  }
}
