.page-home {
  --home-space: clamp(56px, 9vw, 112px);
  --home-chip-bg: rgba(255, 255, 255, 0.78);
  background-color: var(--paper);
}

/* ---------- 首屏 Hero 与分类磁贴矩阵 ---------- */
.page-home .home-hero {
  position: relative;
  padding: clamp(20px, 4vw, 44px) 0 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(216, 230, 242, 0.75), transparent 34%),
    radial-gradient(circle at 88% 72%, rgba(245, 227, 179, 0.62), transparent 30%),
    var(--paper);
}

.page-home .hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page-home .hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: saturate(0.65);
}

.page-home .home-hero-inner {
  position: relative;
  z-index: 1;
}

.page-home .hero-title-band {
  position: relative;
  margin-bottom: clamp(18px, 3vw, 32px);
  padding: 18px 20px;
  background: var(--night);
  border-radius: var(--radius-lg);
  border-left: 6px solid var(--accent);
}

.page-home .hero-title-band::after {
  content: "";
  position: absolute;
  left: 14px;
  right: -8px;
  bottom: -6px;
  height: 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(45, 45, 45, 0.06);
  border-radius: var(--radius);
  z-index: -1;
}

.page-home .hero-breadcrumb {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #F5E3B3;
}

.page-home .hero-breadcrumb a {
  color: inherit;
  text-decoration-color: rgba(245, 227, 179, 0.5);
}

.page-home .hero-title-band h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #fff;
}

.page-home .hero-lead {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.page-home .hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px 18px;
  margin: 10px 0 0;
}

.page-home .hero-stat dt {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 2px;
}

.page-home .hero-stat dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.18rem;
  font-weight: 800;
  color: #F5E3B3;
}

@media (min-width: 900px) {
  .page-home .hero-title-band {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
  }

  .page-home .hero-stats {
    margin: 0 0 4px;
  }
}

.page-home .home-tile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .page-home .home-tile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

.page-home .home-tile-grid .tile {
  position: relative;
  min-height: 112px;
  padding: 16px 13px 14px;
  border-radius: 10px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(45, 45, 45, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.page-home .home-tile-grid .tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(45, 45, 45, 0.12);
  filter: saturate(1.15) brightness(0.98);
}

.page-home .home-tile-grid .tile-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  opacity: 0.66;
}

.page-home .home-tile-grid .tile-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-home .home-tile-grid .tile-count {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.page-home .home-tile-grid .tile-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.page-home .home-tile-grid .tile-go {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 1rem;
  opacity: 0.5;
}

.page-home .hero-update-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 4px;
  padding: 12px 14px;
  background: var(--home-chip-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
}

.page-home .batch-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
}

.page-home .hero-update-strip span {
  color: var(--ink);
}

.page-home .hero-update-strip a:not(.batch-chip) {
  color: var(--blue);
  font-weight: 600;
  text-underline-offset: 3px;
}

.page-home .hero-keyword-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.page-home .hero-keyword-strip span {
  display: inline-block;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(45, 45, 45, 0.04);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--ink);
}

/* ---------- 通用分区结构 ---------- */
.page-home .home-section {
  padding: var(--home-space) 0;
}

.page-home .home-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 26px;
}

.page-home .home-section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.page-home .section-no {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent);
  margin-right: 10px;
}

.page-home .home-section-sub {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: rgba(45, 45, 45, 0.72);
}

.page-home .home-section-more {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  padding-bottom: 2px;
  white-space: nowrap;
}

.page-home .home-section-more:hover {
  color: var(--accent);
}

/* ---------- 最新收录条目墙 ---------- */
.page-home .home-head-listing {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-yellow) 60%);
}

.page-home .home-head-layout {
  display: grid;
  gap: 22px;
}

@media (min-width: 900px) {
  .page-home .home-head-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
}

.page-home .home-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

@media (min-width: 1200px) {
  .page-home .home-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.page-home .home-entry-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 14px 12px;
  border-radius: var(--radius-lg);
  border-top-width: 5px;
  background: var(--card);
  box-shadow: 0 2px 10px rgba(45, 45, 45, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.page-home .home-entry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(45, 45, 45, 0.1);
}

.page-home .home-entry-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.page-home .home-entry-batch {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--gray);
}

.page-home .home-entry-card .card-title {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.35;
}

.page-home .home-entry-card .card-text {
  margin: 0 0 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--gray);
}

.page-home .home-entry-card-hover {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(45, 45, 45, 0.72);
}

@media (min-width: 961px) {
  .page-home .home-entry-card-hover {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    border-top: 0;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.2s ease, padding-top 0.2s ease, border-top 0.2s ease;
  }

  .page-home .home-entry-card:hover .home-entry-card-hover {
    max-height: 70px;
    opacity: 1;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
    margin-top: 4px;
  }
}

.page-home .home-latest-aside {
  display: grid;
  gap: 14px;
  align-content: start;
}

@media (min-width: 900px) {
  .page-home .home-latest-aside {
    position: sticky;
    top: 96px;
  }
}

.page-home .home-latest-aside img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid #fff;
  box-shadow: 0 8px 24px rgba(45, 45, 45, 0.12);
}

.page-home .home-access-card {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--tag-gold);
  border-radius: var(--radius-lg);
}

.page-home .home-access-title {
  margin: 0 0 10px;
  font-size: 1.06rem;
  font-weight: 800;
}

.page-home .home-access-text {
  margin: 0 0 6px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink);
}

.page-home .home-access-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}

.page-home .home-access-links a,
.page-home .home-rank-side-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.page-home .home-access-links a:hover,
.page-home .home-rank-side-links a:hover {
  color: var(--accent);
}

/* ---------- 热门入口榜单 ---------- */
.page-home .home-rank {
  background:
    linear-gradient(160deg, var(--paper-pink), rgba(242, 216, 216, 0.55) 55%, var(--paper) 100%);
}

.page-home .home-rank-layout {
  display: grid;
  gap: 22px;
}

@media (min-width: 900px) {
  .page-home .home-rank-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }
}

.page-home .home-rank-list {
  display: grid;
  gap: 8px;
}

.page-home .home-rank-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "index name trend"
    "index bar trend";
  gap: 4px 10px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(224, 224, 224, 0.9);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.page-home .home-rank-item:hover {
  border-color: var(--accent);
  background: var(--card);
  transform: translateX(4px);
}

.page-home .home-rank-item .rank-index {
  grid-area: index;
  align-self: center;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 800;
  background: rgba(45, 45, 45, 0.06);
  border-radius: 8px;
  color: var(--ink);
}

.page-home .home-rank-item .rank-index-1 {
  background: var(--tag-gold);
  color: #fff;
  font-size: 0.94rem;
}

.page-home .home-rank-item .rank-index-2 {
  background: #D9D9D9;
  color: var(--ink);
}

.page-home .home-rank-item .rank-index-3 {
  background: #E8A06B;
  color: #fff;
}

.page-home .home-rank-name {
  grid-area: name;
  align-self: center;
  font-weight: 700;
  font-size: 0.93rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .home-rank-bar {
  grid-area: bar;
  height: 10px;
  border-radius: 999px;
  background: #EFD7CF;
  overflow: hidden;
}

.page-home .home-rank-bar .metric-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--orange));
}

.page-home .home-rank-trend {
  grid-area: trend;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.page-home .trend-up {
  color: var(--accent);
}

.page-home .trend-down {
  color: var(--gray);
}

.page-home .trend-flat {
  color: var(--blue);
}

.page-home .home-rank-aside {
  display: grid;
  gap: 14px;
  align-content: start;
}

@media (min-width: 900px) {
  .page-home .home-rank-aside {
    position: sticky;
    top: 96px;
  }
}

.page-home .home-rank-aside img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 28px rgba(45, 45, 45, 0.12);
}

.page-home .home-rank-side-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ---------- 标签云索引 ---------- */
.page-home .home-tagcloud {
  background:
    radial-gradient(circle at 80% 12%, rgba(216, 232, 216, 0.6), transparent 42%),
    var(--paper-green);
}

.page-home .home-tagcloud-layout {
  display: grid;
  gap: 20px;
}

.page-home .home-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-home .home-tag-cloud .tag-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.page-home .home-tag-cloud .tag-block:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 14px rgba(45, 45, 45, 0.14);
}

.page-home .home-tag-cloud .tag-level-1 {
  font-size: 1.2rem;
  background: var(--tag-red);
  color: #fff;
}

.page-home .home-tag-cloud .tag-level-2 {
  font-size: 1.05rem;
  background: var(--tag-gold);
  color: var(--ink);
}

.page-home .home-tag-cloud .tag-level-3 {
  font-size: 0.85rem;
  background: var(--tag-violet);
  color: #fff;
}

.page-home .tag-link-count {
  font-family: var(--font-mono);
  font-size: 0.72em;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 2px 7px;
  letter-spacing: 0.05em;
}

.page-home .home-tag-figure {
  margin: 0;
}

.page-home .home-tag-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 30px rgba(45, 45, 45, 0.1);
}

/* ---------- 更新批次与访问支持 ---------- */
.page-home .home-batch-strip {
  padding: 26px 0 30px;
  background: var(--night);
  color: #fff;
}

.page-home .home-batch-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.page-home .home-batch-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.page-home .home-batch-code {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 14px;
}

.page-home .home-batch-meta {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

.page-home .batch-strip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-left: auto;
}

.page-home .batch-strip-links a {
  color: #F5E3B3;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(245, 227, 179, 0.5);
  padding-bottom: 2px;
}

.page-home .batch-strip-links a:hover {
  color: #fff;
  border-color: #fff;
}
