.page-home {
  --home-gap: 20px;
  --home-radius-lg: 24px;
  --home-radius-md: 16px;
  --home-radius-sm: 12px;
  --home-transition: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  --home-font-display: "Avenir Next", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --home-font-mono: "SFMono-Regular", "Roboto Mono", "Consolas", monospace;
  background: var(--c-bg-soft);
  min-height: 70vh;
  color: var(--c-text);
  overflow-x: hidden;
}

.page-home .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* 目录头 */
.page-home .directory-header {
  padding: 48px 0 32px;
  position: relative;
}

.page-home .directory-header::before {
  content: "";
  position: absolute;
  top: 56px;
  left: 0;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--c-action);
}

.page-home .directory-kicker {
  display: block;
  font-family: var(--home-font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-interact);
  margin-bottom: 14px;
}

.page-home .directory-title {
  font-family: var(--home-font-display);
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.14;
  font-weight: 800;
  color: var(--c-space);
  max-width: 18ch;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.page-home .directory-intro {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-muted);
  max-width: 660px;
  margin: 0 0 22px;
}

.page-home .directory-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-home .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--home-transition), background var(--home-transition), color var(--home-transition), box-shadow var(--home-transition);
  box-sizing: border-box;
}

.page-home .btn-ghost {
  background: rgba(67, 115, 184, 0.08);
  color: var(--c-interact);
  border: 1px solid rgba(67, 115, 184, 0.35);
}

.page-home .btn-ghost:hover {
  background: rgba(255, 140, 66, 0.12);
  border-color: var(--c-action);
  color: var(--c-action);
  transform: translateY(-2px);
}

.page-home .btn-primary {
  background: var(--c-action);
  color: var(--c-surface);
  box-shadow: var(--shadow-orange);
  border: 1px solid transparent;
  font-weight: 700;
}

.page-home .btn-primary:hover {
  background: #e8752a;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255, 140, 66, 0.38);
}

.page-home .btn-small {
  padding: 6px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.page-home .text-link {
  color: var(--c-interact);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color var(--home-transition);
}

.page-home .text-link:hover {
  color: var(--c-action);
}

/* Bento 网格 */
.page-home .bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--home-gap);
  padding-bottom: 64px;
}

.page-home .bento-card {
  position: relative;
  border-radius: var(--home-radius-lg);
  padding: 28px 24px;
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--home-transition), box-shadow var(--home-transition);
  box-sizing: border-box;
  scroll-margin-top: 24px;
}

.page-home .bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.page-home .bento-card--dark {
  background: var(--c-space);
  color: var(--c-surface);
}

.page-home .bento-card--tint {
  background: var(--c-bg-soft);
}

.page-home .bento-card--wide {
  grid-column: 1;
  background: linear-gradient(150deg, #0B1B3D 0%, #132a58 58%, #1F3B6E 100%);
}

.page-home .bento-card--mid {
  grid-column: 1;
}

.page-home .bento-card--full {
  grid-column: 1;
}

.page-home .exhibit-num {
  position: absolute;
  top: 16px;
  right: 22px;
  font-family: var(--home-font-mono);
  font-size: 13px;
  color: var(--c-muted);
  letter-spacing: 0.06em;
}

.page-home .exhibit-num::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--c-action);
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 999px;
}

.page-home .bento-card--dark .exhibit-num {
  color: rgba(232, 240, 254, 0.55);
}

/* Section head */
.page-home .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-home .section-title {
  font-family: var(--home-font-display);
  font-size: 26px;
  font-weight: 800;
  color: inherit;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 8px;
}

.page-home .section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: var(--c-action);
}

.page-home .section-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-muted);
  margin: 8px 0 0;
  width: 100%;
}

.page-home .bento-card--dark .section-desc {
  color: rgba(232, 240, 254, 0.72);
}

/* tag */
.page-home .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.page-home .tag--orange {
  background: rgba(255, 140, 66, 0.18);
  color: #ffa060;
}

/* 更新日志 */
.page-home .update-inner {
  position: relative;
  z-index: 2;
}

.page-home .update-timeline {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.page-home .update-item {
  position: relative;
  padding-left: 0;
  margin-bottom: 0;
  border-radius: var(--home-radius-md);
}

.page-home .update-item + .update-item {
  border-top: 1px solid rgba(232, 240, 254, 0.1);
}

.page-home .update-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 6px;
  cursor: pointer;
  flex-wrap: wrap;
}

.page-home .update-item-head:hover .version-chip {
  background: rgba(255, 140, 66, 0.3);
}

.page-home .version-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(67, 115, 184, 0.22);
  color: #fff;
  letter-spacing: 0.02em;
  transition: background var(--home-transition);
  flex-shrink: 0;
}

.page-home .update-meta {
  font-size: 14px;
  color: rgba(232, 240, 254, 0.72);
  flex: 1;
  min-width: 120px;
}

.page-home .update-arrow {
  color: var(--c-action);
  font-size: 18px;
  transition: transform var(--home-transition);
}

.page-home .update-item:hover .update-arrow {
  transform: translateX(4px);
}

.page-home .update-detail {
  padding: 0 6px 4px;
}

.page-home .update-detail summary {
  font-size: 13px;
  color: rgba(232, 240, 254, 0.55);
  cursor: pointer;
  padding: 4px 0 8px;
  font-family: var(--home-font-mono);
  letter-spacing: 0.03em;
  list-style: none;
}

.page-home .update-detail summary::-webkit-details-marker {
  display: none;
}

.page-home .update-detail summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  border: 1px solid rgba(232, 240, 254, 0.3);
  margin-right: 8px;
  font-size: 13px;
  color: var(--c-action);
}

.page-home .update-detail[open] summary::before {
  content: "−";
}

.page-home .update-list {
  list-style: none;
  margin: 8px 0 12px;
  padding: 10px 12px 10px 32px;
  background: rgba(232, 240, 254, 0.06);
  border-radius: var(--home-radius-sm);
}

.page-home .update-list li {
  position: relative;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(232, 240, 254, 0.9);
  padding: 4px 0;
}

.page-home .update-list li::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-action);
  opacity: 0.7;
}

.page-home .update-footer {
  padding-top: 4px;
}

.page-home .bento-card--dark .text-link {
  color: rgba(232, 240, 254, 0.68);
}

.page-home .bento-card--dark .text-link:hover {
  color: var(--c-action);
}

/* 指南 */
.page-home .guide-card {
  display: flex;
  flex-direction: column;
}

.page-home .guide-card .section-head {
  margin-bottom: 16px;
}

.page-home .guide-media {
  border-radius: var(--home-radius-md);
  overflow: hidden;
  line-height: 0;
  margin-bottom: 18px;
  background: var(--c-bg-soft);
}

.page-home .guide-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-home .guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-home .guide-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(27, 37, 74, 0.06);
}

.page-home .guide-step:last-child {
  border-bottom: none;
}

.page-home .step-index {
  font-family: var(--home-font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--c-action);
  background: rgba(255, 140, 66, 0.1);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-home .step-body {
  flex: 1;
  min-width: 0;
}

.page-home .step-title {
  font-family: var(--home-font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--c-space);
  margin: 0;
  line-height: 1.3;
}

.page-home .step-desc {
  font-size: 13px;
  color: var(--c-muted);
  margin: 2px 0 0;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 下载 */
.page-home .download-card {
  background: var(--c-surface);
  position: relative;
}

.page-home .download-content {
  position: relative;
  z-index: 2;
}

.page-home .download-media {
  border-radius: var(--home-radius-md);
  overflow: hidden;
  line-height: 0;
  margin: 0 0 16px;
  background: var(--c-bg-soft);
}

.page-home .download-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-home .download-scope {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-home .download-scope li {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--c-bg-soft);
  color: var(--c-aux);
  border: 1px solid rgba(67, 115, 184, 0.18);
}

.page-home .download-actions {
  margin-top: 4px;
}

.page-home .cloud-texture {
  position: absolute;
  right: -16px;
  bottom: 0;
  width: 180px;
  height: 110px;
  color: var(--c-interact);
  pointer-events: none;
  opacity: 0.24;
}

/* 内容分区导航 */
.page-home .section-nav-inner {
  position: relative;
  z-index: 2;
}

.page-home .section-nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 4px;
}

.page-home .nav-tile {
  background: var(--c-bg-soft);
  border-radius: var(--home-radius-md);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(67, 115, 184, 0.1);
  transition: transform var(--home-transition), background var(--home-transition), box-shadow var(--home-transition);
}

.page-home .nav-tile:hover {
  transform: translateY(-3px);
  background: var(--c-surface);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 140, 66, 0.25);
}

.page-home .nav-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--c-space);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--home-transition);
}

.page-home .nav-tile:hover .nav-tile-icon {
  background: var(--c-action);
}

.page-home .nav-tile-title {
  font-family: var(--home-font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--c-space);
  margin: 0;
  line-height: 1.3;
}

.page-home .nav-tile-desc {
  font-size: 13px;
  color: var(--c-muted);
  margin: 0;
  line-height: 1.55;
}

.page-home .nav-tile .text-link {
  margin-top: auto;
  padding-top: 6px;
}

/* 响应式 */
@media (min-width: 640px) {
  .page-home .container {
    padding: 0 32px;
  }

  .page-home .bento-grid {
    gap: 24px;
  }

  .page-home .bento-card {
    padding: 32px;
  }

  .page-home .section-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 960px) {
  .page-home .directory-header {
    padding: 64px 0 40px;
  }

  .page-home .directory-title {
    font-size: 46px;
  }

  .page-home .directory-intro {
    font-size: 17px;
  }

  .page-home .bento-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .page-home .bento-card--wide {
    grid-column: span 1;
    grid-row: auto;
  }

  .page-home .bento-card--mid {
    grid-column: auto;
    grid-row: auto;
  }

  .page-home .bento-card--full {
    grid-column: span 2;
  }
}

@media (min-width: 1200px) {
  .page-home .bento-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 22px;
  }

  .page-home .bento-card--wide {
    grid-column: span 7;
  }

  .page-home .bento-card--mid {
    grid-column: auto;
  }

  .page-home .bento-card--mid.guide-card {
    grid-column: span 5;
  }

  .page-home .bento-card--mid.download-card {
    grid-column: span 5;
  }

  .page-home .bento-card--full {
    grid-column: span 10;
  }

  .page-home .section-nav-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }

  .page-home .nav-tile {
    padding: 26px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .bento-card,
  .page-home .btn,
  .page-home .nav-tile {
    transition: none;
  }

  .page-home .bento-card:hover,
  .page-home .btn:hover,
  .page-home .nav-tile:hover {
    transform: none;
  }
}
