.page-home {
  --hero-green-bg: linear-gradient(135deg, #0B5E42 0%, #084a33 100%);
  --hero-gold-bg: linear-gradient(135deg, #C9A84C 0%, #b8942e 100%);
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --archive-glow: 0 0 18px rgba(201, 168, 76, 0.15);
}

/* ===== 首屏对角色块 ===== */
.page-home .hero-section {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  margin-top: calc(var(--nav-height) * -1);
  padding-top: var(--nav-height);
  min-height: 70vh;
}

.page-home .hero-green,
.page-home .hero-gold {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

.page-home .hero-green {
  background: var(--hero-green-bg);
}

.page-home .hero-gold {
  background: var(--hero-gold-bg);
}

.page-home .hero-brand-block {
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.page-home .hero-emblem {
  width: 80px;
  height: 80px;
  object-fit: contain;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.page-home .hero-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  letter-spacing: 0.02em;
}

.page-home .brand-green {
  color: #F5F5DC;
}

.page-home .brand-gold {
  color: var(--gold-bright);
}

.page-home .brand-suffix {
  color: rgba(245, 245, 220, 0.6);
  font-weight: 400;
  font-size: 0.7em;
}

.page-home .hero-tagline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: 0.3em;
  margin: 0.3rem 0 0 0;
  text-transform: uppercase;
}

.page-home .hero-search-block {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.page-home .hero-search-box {
  display: flex;
  gap: 0;
  border: 1px solid rgba(245, 245, 220, 0.25);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(26, 43, 31, 0.3);
  backdrop-filter: blur(4px);
}

.page-home .hero-search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
}

.page-home .hero-search-input::placeholder {
  color: rgba(168, 181, 160, 0.6);
}

.page-home .hero-search-input:focus {
  box-shadow: inset 0 0 0 2px var(--gold-bright);
}

.page-home .hero-search-btn {
  padding: 0.75rem 1.25rem;
  border: none;
  background: var(--primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}

.page-home .hero-search-btn:hover,
.page-home .hero-search-btn:focus-visible {
  background: var(--gold);
  color: #1A2B1F;
}

.page-home .hero-search-hint {
  font-size: 0.8rem;
  color: rgba(245, 245, 220, 0.5);
  text-align: center;
  margin: 0;
}

.page-home .hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.page-home .quick-link {
  font-size: 0.8rem;
  color: rgba(245, 245, 220, 0.7);
  text-decoration: none;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(245, 245, 220, 0.15);
  border-radius: 20px;
  transition: all var(--transition);
}

.page-home .quick-link:hover,
.page-home .quick-link:focus-visible {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
  background: rgba(201, 168, 76, 0.08);
}

/* ===== 分类标签区 ===== */
.page-home .categories-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem 1rem 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.page-home .tab-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.page-home .categories-sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.page-home .category-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all var(--transition);
  user-select: none;
}

.page-home .category-label:hover {
  color: var(--text-primary);
  border-color: var(--border-color);
}

.page-home .category-label:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

.page-home .cat-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.6;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.page-home .category-label:hover .cat-icon {
  opacity: 0.9;
}

/* 选中态 */
.page-home #cat-tab-1:checked ~ .categories-sidebar label[for="cat-tab-1"],
.page-home #cat-tab-2:checked ~ .categories-sidebar label[for="cat-tab-2"],
.page-home #cat-tab-3:checked ~ .categories-sidebar label[for="cat-tab-3"],
.page-home #cat-tab-4:checked ~ .categories-sidebar label[for="cat-tab-4"] {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
}

.page-home #cat-tab-1:checked ~ .categories-sidebar label[for="cat-tab-1"] .cat-icon,
.page-home #cat-tab-2:checked ~ .categories-sidebar label[for="cat-tab-2"] .cat-icon,
.page-home #cat-tab-3:checked ~ .categories-sidebar label[for="cat-tab-3"] .cat-icon,
.page-home #cat-tab-4:checked ~ .categories-sidebar label[for="cat-tab-4"] .cat-icon {
  opacity: 1;
}

/* ===== 内容卡片网格 ===== */
.page-home .content-grid {
  position: relative;
  min-height: 320px;
}

.page-home .card-panel {
  display: none;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  animation: panelFadeIn 0.35s ease;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-home #cat-tab-1:checked ~ .content-grid [data-cat="1"],
.page-home #cat-tab-2:checked ~ .content-grid [data-cat="2"],
.page-home #cat-tab-3:checked ~ .content-grid [data-cat="3"],
.page-home #cat-tab-4:checked ~ .content-grid [data-cat="4"] {
  display: grid;
}

.page-home .card {
  display: flex;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.25rem;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: default;
}

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

.page-home .card-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(10, 20, 12, 0.4);
  border-radius: 4px;
  padding: 4px;
}

.page-home .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.page-home .card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.page-home .card-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.page-home .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.page-home .tag {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.2);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.page-home .panel-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(90, 122, 90, 0.3);
}

.page-home .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  line-height: 1.4;
}

.page-home .btn-outline {
  color: var(--gold);
  border-color: var(--gold);
  background: transparent;
}

.page-home .btn-outline:hover,
.page-home .btn-outline:focus-visible {
  background: var(--gold);
  color: #1A2B1F;
}

.page-home .btn-primary {
  color: #1A2B1F;
  background: var(--gold);
  border-color: var(--gold);
}

.page-home .btn-primary:hover,
.page-home .btn-primary:focus-visible {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

/* ===== 档案入口 ===== */
.page-home .archive-entry {
  padding: 2rem 1rem 2.5rem;
  background: var(--bg-deep);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.page-home .archive-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: rgba(44, 62, 47, 0.5);
  box-shadow: var(--archive-glow);
}

.page-home .archive-icon-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 168, 76, 0.08);
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.page-home .archive-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  opacity: 0.8;
}

.page-home .archive-text {
  flex: 1;
}

.page-home .archive-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}

.page-home .archive-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
  max-width: 520px;
}

.page-home .archive-btn {
  flex-shrink: 0;
}

/* ===== 信任声明横幅 ===== */
.page-home .trust-banner {
  padding: 1.25rem 1rem;
  text-align: center;
  background: var(--bg-surface);
}

.page-home .trust-banner .trust-statement {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.7;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===== 桌面端 (≥768px) ===== */
@media (min-width: 768px) {
  .page-home .hero-section {
    flex-direction: row;
    min-height: 60vh;
  }

  .page-home .hero-green,
  .page-home .hero-gold {
    padding: 3rem 2.5rem;
  }

  .page-home .hero-green {
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
    margin-right: -1px;
    z-index: 1;
  }

  .page-home .hero-gold {
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
    margin-left: -1px;
  }

  .page-home .hero-brand-block {
    align-items: flex-start;
    text-align: left;
    padding-left: 10%;
  }

  .page-home .hero-title {
    font-size: 2.6rem;
  }

  .page-home .hero-tagline {
    font-size: 1rem;
    letter-spacing: 0.4em;
  }

  .page-home .hero-search-block {
    align-items: flex-start;
    padding-right: 10%;
  }

  .page-home .hero-search-hint {
    text-align: left;
  }

  .page-home .hero-quick-links {
    justify-content: flex-start;
  }

  .page-home .hero-emblem {
    width: 100px;
    height: 100px;
  }

  .page-home .categories-section {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    padding: 2.5rem 1.5rem 3rem;
  }

  .page-home .categories-sidebar {
    flex-direction: column;
    flex: 0 0 200px;
    border-bottom: none;
    border-right: 1px solid var(--border-color);
    padding-bottom: 0;
    padding-right: 1.5rem;
    gap: 0.35rem;
  }

  .page-home .category-label {
    width: 100%;
    padding: 0.65rem 1rem;
    border-width: 1px;
    border-color: transparent;
    border-style: solid;
  }

  .page-home .content-grid {
    flex: 1;
    min-height: 280px;
  }

  .page-home .card-panel {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .page-home .card-thumb {
    width: 80px;
    height: 80px;
  }

  .page-home .archive-inner {
    flex-direction: row;
    text-align: left;
    gap: 1.5rem;
    padding: 2rem 2.5rem;
  }

  .page-home .archive-text {
    text-align: left;
  }

  .page-home .archive-icon-wrap {
    width: 64px;
    height: 64px;
  }

  .page-home .archive-icon {
    width: 40px;
    height: 40px;
  }

  .page-home .archive-title {
    font-size: 1.4rem;
  }

  .page-home .archive-btn {
    margin-left: auto;
  }
}

/* ===== 大桌面端 (≥1024px) ===== */
@media (min-width: 1024px) {
  .page-home .hero-title {
    font-size: 3rem;
  }

  .page-home .hero-green,
  .page-home .hero-gold {
    padding: 4rem 3.5rem;
  }

  .page-home .hero-green {
    clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
  }

  .page-home .hero-gold {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
  }

  .page-home .hero-emblem {
    width: 120px;
    height: 120px;
  }

  .page-home .categories-section {
    padding: 3rem 2rem 3.5rem;
    gap: 2.5rem;
  }

  .page-home .categories-sidebar {
    flex: 0 0 240px;
    gap: 0.5rem;
  }

  .page-home .card-panel {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .page-home .archive-inner {
    padding: 2.5rem 3rem;
  }
}

/* ===== 移动端窄屏安全 ===== */
@media (max-width: 380px) {
  .page-home .hero-title {
    font-size: 1.5rem;
  }

  .page-home .hero-emblem {
    width: 60px;
    height: 60px;
  }

  .page-home .hero-search-box {
    flex-wrap: wrap;
  }

  .page-home .hero-search-input {
    width: 100%;
  }

  .page-home .hero-search-btn {
    width: 100%;
    text-align: center;
  }

  .page-home .card {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-home .card-thumb {
    width: 60px;
    height: 60px;
  }

  .page-home .category-label {
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
  }

  .page-home .cat-icon {
    width: 16px;
    height: 16px;
  }
}
