.page-home{
  --home-stack: 4px 4px 0 rgba(22,87,74,.10);
  --home-stack-hover: 6px 6px 0 rgba(238,106,70,.22);
  --home-dot: radial-gradient(circle at 1px 1px, rgba(16,28,25,.09) 1px, transparent 1.5px);
  --home-stepcol: clamp(64px, 11vw, 96px);
  background-color: var(--c-paper);
  color: var(--c-ink);
}

/* ---------- 首屏 ---------- */
.page-home .home-hero{
  position: relative;
  padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 6vw, 80px);
  background-image: var(--home-dot);
  background-size: 22px 22px;
  overflow: hidden;
}
.page-home .home-hero__inner{
  display: grid;
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
}
.page-home .home-hero__title{
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--c-deep);
}
.page-home .home-hero__lede{
  margin: 16px 0 0;
  max-width: 34ch;
  font-size: 17px;
  line-height: 1.75;
  color: var(--c-grey);
}
.page-home .home-hero__actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: clamp(20px, 3vw, 30px);
}
.page-home .home-hero__alt{
  font-size: 15px;
  color: var(--c-green);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.page-home .home-hero__alt:hover,
.page-home .home-hero__alt:focus-visible{
  color: var(--c-coral-deep);
  border-color: var(--c-coral);
}
.page-home .home-hero__stats{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: clamp(24px, 4vw, 36px) 0 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--c-grey);
}
.page-home .home-hero__stats .mono{
  color: var(--c-amber);
  font-weight: 600;
  margin-right: 4px;
}

.page-home .home-hero__panel{
  --hero-cut: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  min-height: 320px;
  padding: clamp(26px, 4vw, 40px) clamp(20px, 3vw, 32px);
  color: var(--c-paper);
}
.page-home .home-hero__panel::before{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-deep);
  clip-path: var(--hero-cut);
  z-index: 0;
}
.page-home .home-hero__panel::after{
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58%;
  height: 6px;
  background: var(--c-amber);
  z-index: 2;
}
.page-home .home-hero__bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .34;
  clip-path: var(--hero-cut);
  z-index: 0;
}
.page-home .home-hero__panel > *:not(.home-hero__bg){
  position: relative;
  z-index: 1;
}
.page-home .home-hero__panel-title{
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--c-amber-soft);
}
.page-home .home-hero__stack{
  display: grid;
  gap: 10px;
}
.page-home .hero-entry{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--rule-invert);
  background: rgba(246,241,231,.06);
  color: var(--c-paper);
  text-decoration: none;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.page-home .hero-entry__num{
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--c-amber-soft);
}
.page-home .hero-entry__text{
  font-size: 15px;
  line-height: 1.5;
}
.page-home .hero-entry:hover,
.page-home .hero-entry:focus-visible{
  border-color: var(--c-coral);
  background: rgba(238,106,70,.16);
  transform: translateX(4px);
}
.page-home .hero-entry:hover .hero-entry__num,
.page-home .hero-entry:focus-visible .hero-entry__num{
  color: var(--c-coral);
}

/* ---------- 通用小节头 ---------- */
.page-home .home-head{
  max-width: 60ch;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.page-home .home-head .lead{
  margin-top: 10px;
}

/* ---------- 三栏索引 ---------- */
.page-home .home-index{
  background: var(--c-paper);
}
.page-home .home-index__figure{
  margin: 0 0 clamp(22px, 3vw, 34px);
  position: relative;
  border: 1px solid var(--rule);
  background: var(--c-paper-lift);
  box-shadow: var(--home-stack);
}
.page-home .home-index__figure img{
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}
.page-home .home-index__cap{
  display: block;
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--c-grey);
  border-top: 1px solid var(--rule);
}
.page-home .home-index__grid{
  display: grid;
  gap: clamp(18px, 2.4vw, 28px);
}
.page-home .home-col{
  position: relative;
  padding: clamp(20px, 2.6vw, 30px);
  background: var(--c-paper-lift);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--c-green);
  box-shadow: var(--home-stack);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.page-home .home-col:hover,
.page-home .home-col:focus-within{
  border-color: var(--c-coral);
  border-top-color: var(--c-coral);
  box-shadow: var(--home-stack-hover);
}
.page-home .home-col__top{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.page-home .home-col__title{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--c-deep);
}
.page-home .home-col:hover .num-tag{
  background: var(--c-amber);
  color: var(--c-paper-lift);
}
.page-home .home-col__desc{
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-grey);
}
.page-home .home-col__list{
  margin: 0;
  padding: 0;
  list-style: none;
}
.page-home .home-col__list a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 15px;
  color: var(--c-ink);
  text-decoration: none;
  transition: color var(--t-fast), border-color var(--t-fast), padding-left var(--t-fast);
}
.page-home .home-col__list a::after{
  content: "→";
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-green-soft);
  transition: color var(--t-fast);
}
.page-home .home-col__list li:last-child a{
  border-bottom: 0;
}
.page-home .home-col__list a:hover,
.page-home .home-col__list a:focus-visible{
  color: var(--c-coral-deep);
  border-color: var(--c-coral);
  padding-left: 4px;
}
.page-home .home-col__list a:hover::after,
.page-home .home-col__list a:focus-visible::after{
  color: var(--c-coral);
}

/* ---------- 端间切换 ---------- */
.page-home .home-switch{
  padding: clamp(36px, 6vw, 76px) 0;
  background: linear-gradient(180deg, var(--c-paper) 0, rgba(221,231,238,.7) 16%, var(--c-mist-soft) 100%);
}
.page-home .home-switch__inner{
  display: grid;
  gap: clamp(20px, 3vw, 34px);
  align-items: center;
  margin-bottom: clamp(24px, 4vw, 40px);
}
.page-home .home-switch__figure{
  margin: 0;
  background: var(--c-paper-lift);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--home-stack);
}
.page-home .home-switch__figure img{
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}
.page-home .home-switch__cap{
  display: block;
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--c-grey);
  border-top: 1px solid var(--rule);
}
.page-home .switch-body{
  position: relative;
}
.page-home .switch-bar{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.page-home .switch-bar label{
  cursor: pointer;
  padding: 9px 15px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--c-deep);
  background: var(--c-paper-lift);
  border: 1px solid var(--rule-strong);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.page-home .switch-bar label:hover{
  border-color: var(--c-coral);
  color: var(--c-coral-deep);
}
.page-home #dev-all:checked ~ .switch-bar label[for="dev-all"],
.page-home #dev-pc:checked ~ .switch-bar label[for="dev-pc"],
.page-home #dev-ios:checked ~ .switch-bar label[for="dev-ios"]{
  background: var(--c-coral);
  border-color: var(--c-coral);
  color: #FFFCF6;
}
.page-home #dev-all:focus-visible ~ .switch-bar label[for="dev-all"],
.page-home #dev-pc:focus-visible ~ .switch-bar label[for="dev-pc"],
.page-home #dev-ios:focus-visible ~ .switch-bar label[for="dev-ios"]{
  outline: 2px solid var(--c-deep);
  outline-offset: 2px;
}
.page-home .switch-list{
  background: var(--c-paper-lift);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--home-stack);
}
.page-home .switch-row{
  display: grid;
  grid-template-columns: var(--home-stepcol) 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}
.page-home .switch-row:last-child{
  border-bottom: 0;
}
.page-home .switch-cell{
  padding: 13px 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-ink);
}
.page-home .switch-cell--step{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--c-amber);
  background: rgba(201,146,43,.08);
  display: flex;
  align-items: center;
}
.page-home .switch-cell--pc{
  background: rgba(147,175,196,.18);
  border-left: 1px solid var(--rule);
}
.page-home .switch-cell--ios{
  background: rgba(240,215,154,.42);
  border-left: 1px solid var(--rule);
}
.page-home .switch-row--head .switch-cell{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--c-deep);
  background: var(--c-mist-soft);
}
.page-home .switch-row--head .switch-cell--ios{
  background: var(--c-amber-soft);
}
.page-home .switch-row--head .switch-cell--ios::before{
  content: "→ ";
  color: var(--c-coral);
}
.page-home .switch-body:has(#dev-pc:checked) .switch-cell--ios,
.page-home .switch-body:has(#dev-ios:checked) .switch-cell--pc{
  display: none;
}
.page-home .switch-body:has(#dev-pc:checked) .switch-row,
.page-home .switch-body:has(#dev-ios:checked) .switch-row{
  grid-template-columns: var(--home-stepcol) 1fr;
}
.page-home .switch-note{
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-grey);
}
.page-home .switch-note a{
  color: var(--c-green);
  text-decoration: none;
  border-bottom: 1px solid var(--c-green-soft);
  margin-left: 4px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.page-home .switch-note a:hover,
.page-home .switch-note a:focus-visible{
  color: var(--c-coral-deep);
  border-color: var(--c-coral);
}

/* ---------- 常走路径 ---------- */
.page-home .home-paths{
  background: var(--c-paper);
}
.page-home .home-paths__grid{
  display: grid;
  gap: clamp(16px, 2.2vw, 24px);
}
.page-home .path-card{
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.6vw, 28px);
  background: var(--c-paper-lift);
  border: 1px solid var(--c-green);
  box-shadow: var(--home-stack);
  color: var(--c-ink);
  text-decoration: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.page-home .path-card:hover,
.page-home .path-card:focus-visible{
  transform: scale(1.02) translate(-2px, -2px);
  border-color: var(--c-coral);
  box-shadow: var(--home-stack-hover);
}
.page-home .path-card:hover .num-tag,
.page-home .path-card:focus-visible .num-tag{
  background: var(--c-amber);
  color: var(--c-paper-lift);
}
.page-home .path-card__title{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.4;
  color: var(--c-deep);
}
.page-home .path-card__desc{
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-grey);
}
.page-home .path-card__steps{
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.page-home .path-card__steps li{
  counter-increment: step;
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-grey);
  transition: color var(--t-fast);
}
.page-home .path-card__steps li::before{
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--c-amber);
}
.page-home .path-card:hover .path-card__steps li,
.page-home .path-card:focus-visible .path-card__steps li{
  color: var(--c-ink);
}
.page-home .path-card__go{
  margin-top: auto;
  padding-top: 12px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--c-green);
  border-top: 1px solid var(--rule);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.page-home .path-card:hover .path-card__go,
.page-home .path-card:focus-visible .path-card__go{
  color: var(--c-coral-deep);
  border-color: var(--c-coral);
}

/* ---------- 最近更新 ---------- */
.page-home .home-latest{
  position: relative;
  overflow: hidden;
  background: var(--c-deep);
  color: var(--c-paper);
}
.page-home .home-latest__bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .16;
  z-index: 0;
}
.page-home .home-latest__inner{
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(24px, 4vw, 44px);
}
.page-home .home-latest .eyebrow{
  color: var(--c-amber-soft);
}
.page-home .home-latest__ver{
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.3;
  color: var(--c-amber-soft);
}
.page-home .home-latest__text{
  margin: 12px 0 22px;
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(246,241,231,.78);
}
.page-home .home-latest__feed-title{
  margin: 0 0 16px;
  color: var(--c-paper);
}
.page-home .home-feed{
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-invert);
}
.page-home .home-feed li{
  border-bottom: 1px solid var(--rule-invert);
}
.page-home .home-feed a{
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  color: var(--c-paper);
  text-decoration: none;
  transition: color var(--t-fast), padding-left var(--t-fast);
}
.page-home .home-feed a:hover,
.page-home .home-feed a:focus-visible{
  color: var(--c-amber-soft);
  padding-left: 6px;
}
.page-home .home-feed__num{
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--c-coral);
  padding-top: 3px;
}
.page-home .home-feed__body{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.page-home .home-feed__name{
  font-size: 16px;
  line-height: 1.55;
}
.page-home .home-feed__tag{
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--c-mist);
}
.page-home .home-latest__more{
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: .02em;
  color: rgba(246,241,231,.62);
}
.page-home .home-latest__more a{
  color: var(--c-amber-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(240,215,154,.5);
  margin-left: 4px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.page-home .home-latest__more a:hover,
.page-home .home-latest__more a:focus-visible{
  color: var(--c-coral);
  border-color: var(--c-coral);
}

/* ---------- 收束 ---------- */
.page-home .home-cta{
  background: var(--c-paper);
  padding: clamp(36px, 6vw, 72px) 0 clamp(44px, 7vw, 84px);
}
.page-home .home-cta__inner{
  display: grid;
  gap: 20px;
  align-items: center;
}
.page-home .home-cta__text{
  margin: 12px 0 0;
  max-width: 44ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--c-grey);
}
.page-home .home-cta__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 响应式 ---------- */
@media (min-width: 720px){
  .page-home .home-paths__grid{
    grid-template-columns: repeat(2, 1fr);
  }
  .page-home .home-latest__feed{
    max-width: 60ch;
  }
}

@media (min-width: 860px){
  .page-home .home-index__grid{
    grid-template-columns: repeat(3, 1fr);
  }
  .page-home .home-switch__inner{
    grid-template-columns: 1fr .82fr;
  }
  .page-home .home-cta__inner{
    grid-template-columns: 1fr auto;
  }
}

@media (min-width: 960px){
  .page-home .home-hero__inner{
    grid-template-columns: 1.06fr .94fr;
    align-items: stretch;
  }
  .page-home .home-hero__panel{
    --hero-cut: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
    padding-left: clamp(56px, 9%, 104px);
    min-height: 400px;
  }
  .page-home .home-latest__inner{
    grid-template-columns: .85fr 1.15fr;
    align-items: start;
  }
  .page-home .home-latest__feed{
    max-width: none;
  }
}

@media (min-width: 1080px){
  .page-home .home-hero__panel{
    min-height: 440px;
  }
}

@media (prefers-reduced-motion: reduce){
  .page-home .path-card,
  .page-home .hero-entry,
  .page-home .home-col__list a,
  .page-home .home-feed a{
    transition: none;
  }
  .page-home .path-card:hover,
  .page-home .path-card:focus-visible{
    transform: none;
  }
}
