/**
 * YOS 资料站 v9 · 手册页通用样式
 * 适用于 join-us / merchant-guide / visitor-guide / compliance-kit
 */

@layer page-layout {
  /* 封面区 · 70vh */
  .v9-hero--cover {
    min-height: 70vh;
    background: linear-gradient(180deg, var(--depth-1) 0%, var(--depth-2) 100%);
  }
  
  .v9-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--g-xl);
  }
  
  .v9-hero__content .v9-h1 {
    margin: var(--g-md) 0;
  }
  
  .v9-hero__sub {
    font-size: 14px;
    color: var(--foam-mute);
  }
  
  /* 两栏布局 */
  .v9-layout-two-rail {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--g-lg);
  }
  
  /* 左侧章节目录 */
  .v9-chapter-rail {
    display: none;
  }
  
  .v9-chapter-nav {
    position: sticky;
    top: 100px;
  }
  
  .v9-chapter-nav p {
    font-size: 12px;
    color: var(--foam-dim);
    margin-bottom: var(--g-md);
  }
  
  .v9-chapter-nav__link {
    display: flex;
    align-items: center;
    gap: var(--g-sm);
    padding: var(--g-sm) 0;
    font-size: 13px;
    color: var(--foam-mute);
    transition: color var(--dur-fast) var(--ease-state);
  }
  
  .v9-chapter-nav__link:hover,
  .v9-chapter-nav__link.is-active {
    color: var(--gold);
  }
  
  .v9-chapter-nav__link img {
    width: 12px;
    height: 12px;
    opacity: 0.6;
  }
  
  /* 右侧正文 */
  .v9-chapter-body {
    flex: 1;
  }
  
  /* 章节 */
  .v9-section {
    padding: var(--g-xl) 0;
    border-bottom: 1px solid var(--glass-border);
  }
  
  .v9-section:last-child {
    border-bottom: none;
  }
  
  /* 数据矩阵 */
  .v9-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--g-md);
    margin: var(--g-lg) 0;
  }
  
  .v9-proof-stat {
    text-align: center;
    padding: var(--g-lg);
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
  }
  
  /* 页脚罗盘 */
  .v9-footer img {
    width: 32px;
    height: 32px;
    margin: 0 auto var(--g-md);
    opacity: 0.6;
  }
  
  /* 平板断点 */
  @media (min-width: 768px) {
    .v9-layout-two-rail {
      flex-direction: row;
      gap: var(--g-xl);
    }
    
    .v9-chapter-rail {
      display: block;
      width: 180px;
      flex-shrink: 0;
    }
    
    .v9-chapter-body {
      flex: 1;
    }
    
    .v9-hero--cover {
      min-height: 60vh;
    }
  }
  
  /* 电脑断点 */
  @media (min-width: 1280px) {
    .v9-chapter-rail {
      width: 220px;
    }
    
    .v9-section {
      padding: var(--g-2xl) 0;
    }
    
    .v9-hero--cover {
      min-height: 50vh;
    }
    
    .v9-hero__content .v9-h1 {
      font-size: 48px;
    }
  }
}

@layer page-component {
  /* 章节进入动画 */
  .v9-section {
    animation: section-enter var(--dur-slow) var(--ease-pagein) both;
  }
  
  @keyframes section-enter {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* 目录链接激活状态 */
  .v9-chapter-nav__link.is-active img {
    opacity: 1;
    animation: compass-spin 4s linear infinite;
  }
  
  @keyframes compass-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
}
