.page-home {
  --home-gap: clamp(64px, 9vw, 140px);
  --home-hairline: rgba(42, 54, 84, 0.85);
  --home-glow: 0 0 0 1px rgba(91, 231, 214, 0.16), 0 26px 70px -34px rgba(91, 231, 214, 0.42);
  --home-glow-orange: 0 0 0 1px rgba(255, 122, 61, 0.22), 0 26px 70px -34px rgba(255, 122, 61, 0.5);
}

/* ---------- 面包屑 ---------- */
.page-home .breadcrumb {
  padding-block: 20px 4px;
}

.page-home .breadcrumb__item:last-child {
  color: var(--cyan);
}

/* ---------- 章节通用 ---------- */
.page-home .chapter {
  position: relative;
  padding-block: clamp(44px, 6.5vw, 96px);
}

.page-home .chapter + .chapter {
  border-top: 1px solid var(--home-hairline);
}

.page-home .chapter__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-home .chapter__num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
  padding: 3px 9px;
  border: 1px solid rgba(91, 231, 214, 0.36);
  border-radius: 999px;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

.page-home .chapter.is-current .chapter__num {
  color: var(--orange);
  border-color: rgba(255, 122, 61, 0.5);
}

.page-home .chapter__title {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  letter-spacing: 0.01em;
}

.page-home .chapter__rule {
  flex: 1 1 90px;
  height: 1px;
  min-width: 40px;
  background: linear-gradient(90deg, rgba(91, 231, 214, 0.7), rgba(122, 107, 255, 0.32) 46%, transparent);
  position: relative;
}

.page-home .chapter__rule::after {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.page-home .chapter__sub {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 clamp(28px, 4vw, 48px);
}

/* ---------- 01 首屏 ---------- */
.page-home .hero {
  overflow: hidden;
  padding-bottom: clamp(56px, 8vw, 120px);
}

.page-home .hero__bg {
  position: absolute;
  inset: -12% -6% auto -6%;
  height: 128%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(42, 54, 84, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 54, 84, 0.55) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 72% 26%, #000 0%, transparent 74%);
  mask-image: radial-gradient(ellipse 78% 62% at 72% 26%, #000 0%, transparent 74%);
}

.page-home .hero__trace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.page-home .hero__trace-line {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: home-trace-draw 4.2s var(--ease) infinite alternate;
}

@keyframes home-trace-draw {
  to { stroke-dashoffset: 0; }
}

.page-home .hero__grid {
  position: relative;
  display: grid;
  gap: clamp(26px, 3.6vw, 48px);
  grid-template-columns: minmax(0, 1fr);
}

.page-home .hero__kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 16px;
}

.page-home .hero__title {
  margin: 0 0 20px;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-transform: none;
}

.page-home .hero__lede {
  max-width: 42ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.8;
  margin: 0 0 26px;
}

.page-home .hero__actions {
  gap: 12px;
  margin-bottom: 30px;
}

.page-home .hero__marks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.page-home .hero__marks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-home .hero__figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--home-hairline);
  background: var(--ink-panel);
  box-shadow: var(--home-glow);
}

.page-home .hero__figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  filter: saturate(0.85);
}

.page-home .hero__collage {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.page-home .hero__card {
  display: block;
  padding: 22px 22px 20px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}

.page-home .hero__card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transition: width 280ms var(--ease);
}

.page-home .hero__card:hover,
.page-home .hero__card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--home-glow-orange);
}

.page-home .hero__card:hover::after,
.page-home .hero__card:focus-visible::after {
  width: 100%;
}

.page-home .hero__card-idx {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--orange);
  margin-bottom: 12px;
}

.page-home .hero__card .card__title {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  margin: 0 0 10px;
}

.page-home .hero__card .card__body {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.72;
  margin: 0 0 14px;
}

.page-home .hero__card-go {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

/* ---------- 02 当季 ---------- */
.page-home .season__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

.page-home .season__card {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-home .season__card .card__title {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.page-home .season__card .card__body {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.74;
  margin: 0;
  flex: 1 1 auto;
}

.page-home .season__card .card__meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
  opacity: 0.8;
}

.page-home .season__link {
  align-self: flex-start;
  margin-top: 4px;
}

.page-home .season__card--a { border-top: 2px solid rgba(91, 231, 214, 0.55); }
.page-home .season__card--b { border-top: 2px solid rgba(255, 122, 61, 0.55); }
.page-home .season__card--c { border-top: 2px solid rgba(122, 107, 255, 0.55); }

/* ---------- 03 版本 ---------- */
.page-home .version__layout {
  display: grid;
  gap: clamp(24px, 3.4vw, 48px);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.page-home .switch {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--home-hairline);
  border-radius: 999px;
  background: var(--ink-panel);
  margin-bottom: 22px;
}

.page-home .switch__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}

.page-home .switch__btn[aria-selected="true"] {
  background: linear-gradient(120deg, rgba(255, 122, 61, 0.9), rgba(255, 122, 61, 0.66));
  color: #12161f;
  font-weight: 700;
}

.page-home .switch__btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.page-home .version__switch-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 16px 0 0;
  opacity: 0.85;
}

.page-home .compare--alt .compare__key {
  color: var(--violet);
}

.page-home .version__figure {
  margin: 0;
  box-shadow: var(--home-glow);
}

.page-home .version__figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: saturate(0.8);
}

.page-home .version__peek {
  margin-top: clamp(26px, 3.6vw, 44px);
  border: 1px solid rgba(91, 231, 214, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(22, 33, 60, 0.92), rgba(12, 20, 40, 0.92));
  overflow: hidden;
}

.page-home .version__peek .fold__summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  font-size: 0.98rem;
  color: var(--bright);
}

.page-home .version__peek .fold__summary::-webkit-details-marker { display: none; }

.page-home .version__peek .fold__idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--ink-void);
  background: var(--cyan);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.page-home .version__peek .fold__body {
  padding: 0 22px 22px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.78;
}

.page-home .version__peek .fold__body p {
  margin: 0 0 12px;
}

.page-home .version__peek .fold__body strong {
  color: var(--bright);
  font-weight: 600;
}

.page-home .version__peek-link {
  margin-top: 6px;
}

/* ---------- 04 横竖屏 ---------- */
.page-home .orient__layout {
  display: grid;
  gap: clamp(24px, 3.4vw, 44px);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.page-home .orient__figure {
  margin: 0;
}

.page-home .orient__figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.8);
}

.page-home .orient__cols {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.page-home .orient__col {
  border-left: 2px solid rgba(91, 231, 214, 0.4);
  padding: 4px 0 4px 20px;
}

.page-home .orient__col--wide {
  border-left-color: rgba(255, 122, 61, 0.55);
}

.page-home .orient__label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin: 0 0 8px;
}

.page-home .orient__label--alt {
  color: var(--orange);
}

.page-home .orient__head {
  margin: 0 0 12px;
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
}

.page-home .orient__list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.8;
}

.page-home .orient__list li + li {
  margin-top: 6px;
}

.page-home .orient__note {
  margin-top: clamp(24px, 3vw, 38px);
  font-size: 0.94rem;
  line-height: 1.75;
}

/* ---------- 05 支持 ---------- */
.page-home .support {
  position: relative;
  overflow: hidden;
  padding-bottom: clamp(64px, 9vw, 128px);
}

.page-home .support__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
}

.page-home .support__bg img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  filter: saturate(0.6);
}

.page-home .support .container {
  position: relative;
}

.page-home .support__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  counter-reset: sup;
}

.page-home .support__step {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.page-home .support__step-idx {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(91, 231, 214, 0.6);
  letter-spacing: 0.06em;
  line-height: 1;
}

.page-home .support__step:nth-child(2) .support__step-idx { -webkit-text-stroke-color: rgba(255, 122, 61, 0.7); }
.page-home .support__step:nth-child(3) .support__step-idx { -webkit-text-stroke-color: rgba(122, 107, 255, 0.75); }

.page-home .support__step .card__title {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.page-home .support__step .card__body {
  margin: 0;
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.76;
}

.page-home .support__link {
  align-self: flex-start;
}

.page-home .support__foot {
  margin-top: clamp(32px, 4.4vw, 56px);
  padding: 24px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--home-hairline);
  background: var(--ink-panel);
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.page-home .support__foot-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.78;
  max-width: 62ch;
}

.page-home .support__foot-btn {
  flex: none;
}

/* ---------- 焦点可见性 ---------- */
.page-home a:focus-visible,
.page-home button:focus-visible,
.page-home summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 断点 ---------- */
@media (min-width: 640px) {
  .page-home .hero__collage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .page-home .hero__card--a { margin-top: 30px; }
  .page-home .hero__card--b { margin-top: 0; }
  .page-home .hero__card--c { margin-top: 56px; }

  .page-home .season__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .page-home .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
    grid-template-areas:
      "intro figure"
      "collage collage";
    align-items: start;
  }
  .page-home .hero__intro { grid-area: intro; }
  .page-home .hero__figure { grid-area: figure; }
  .page-home .hero__collage { grid-area: collage; }

  .page-home .season__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px;
  }
  .page-home .season__card--a { grid-column: span 5; }
  .page-home .season__card--b { grid-column: span 4; }
  .page-home .season__card--c { grid-column: span 3; }

  .page-home .version__layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  }

  .page-home .orient__layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .page-home .support__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-home .support__foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1120px) {
  .page-home .hero__figure img {
    aspect-ratio: 4 / 3;
  }
  .page-home .hero__collage {
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero__trace-line {
    animation: none;
    stroke-dashoffset: 0;
  }
  .page-home .hero__card,
  .page-home .hero__card::after {
    transition: none;
  }
  .page-home .hero__card:hover,
  .page-home .hero__card:focus-visible {
    transform: none;
  }
}
