/* 下载页样式：加载顺序 portal.css → download.css，
   因此只复用门户的 :root 令牌（--ink / --paper / --lime / --line / --muted）
   与门户已定义的 .site-header / .button / .eyebrow / .skip-link / .footer-brands，
   不重复定义、也不自造近似色值。 */

.download-page {
  background: var(--paper);
  color: var(--ink);
}

/* ------------------------------------------- 页头：沿用门户 .site-header */
.download-header .header-actions {
  margin-left: auto;
}

/* ------------------------------------------- Hero
   与门户 hero 共用同一套蓝色渐变：黑色浮动页头压在蓝底上边界清晰，
   向下经 --sky 过渡回纸白，保持门户「上蓝下浅」的读法。 */
.download-hero {
  position: relative;
  overflow: hidden;
  padding: 132px max(24px, calc((100vw - 1040px) / 2)) 130px;
  /* 与门户 hero 完全同源：同一套天空渐变，保证蓝天/草地与门户一致。 */
  background: linear-gradient(180deg, #2414ae 0%, #347df1 45%, var(--sky) 100%);
  color: #fff;
}

/* 门户 hero 同款柔光层 */
.download-hero::before {
  content: "";
  position: absolute;
  inset: -60px;
  background: linear-gradient(180deg, #190096 0%, #0080ff 24%, #78d2ff 62%, rgba(255, 255, 255, 0) 100%);
  filter: blur(50px);
  opacity: .82;
}

/* 底部向纸白轻过渡，收窄到 64px，避免出现大片雾带 */
.download-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 64px;
  background: linear-gradient(rgba(157, 218, 255, 0), var(--paper));
  pointer-events: none;
}

.download-hero > * {
  position: relative;
  z-index: 1;
}

.download-hero .eyebrow {
  color: var(--lime);
}

.download-hero h1 {
  margin: 0;
  font-size: clamp(62px, 6.8vw, 88px);
  line-height: 1;
  font-weight: 800;
}

.download-hero h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
}

.download-hero-copy {
  max-width: 660px;
  margin: 27px 0 0;
  color: rgba(255, 255, 255, .92);
  font-size: 17px;
  line-height: 1.55;
}

/* ------------------------------------------- 平台切换器（药丸容器） */
.platform-switch {
  display: inline-flex;
  gap: 4px;
  margin-top: 34px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
}

.platform-switch button {
  min-width: 130px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.platform-switch button:hover {
  background: rgba(255, 255, 255, .12);
}

.platform-switch button[aria-selected="true"] {
  background: var(--lime);
  color: var(--ink);
}

/* ------------------------------------------- 版本内容区 */
.download-content {
  padding: 72px max(24px, calc((100vw - 1040px) / 2)) 96px;
  background: var(--paper);
}

.download-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.download-section-head .eyebrow {
  margin-bottom: 10px;
}

.download-section-head h2 {
  margin: 0;
  font-size: clamp(43px, 5.1vw, 62px);
  line-height: .96;
  font-weight: 800;
}

#download-status {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

/* ------------------------------------------- 版本卡片 */
.edition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.edition-panel {
  display: grid;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

/* 企业版不再使用红色描边，改用门户 .workflow-node 的顶部强调条手法 */
.edition-panel.enterprise {
  border-top: 3px solid var(--lime);
}

.edition-head > span {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.edition-head h3 {
  margin: 6px 0 8px;
  font-size: 26px;
}

.edition-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ------------------------------------------- 下载条目 */
.download-options {
  display: grid;
  gap: 10px;
}

.download-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.download-option strong {
  display: block;
  font-size: 15px;
}

.download-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.download-option .button {
  min-width: 130px;
  border: 0;
  cursor: pointer;
}

.download-option button:disabled {
  opacity: .48;
  pointer-events: none;
  cursor: default;
}

/* ------------------------------------------- 移动端提示 */
.mobile-note {
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--lime);
  border-radius: 8px;
  background: #fff;
}

.mobile-note strong {
  font-size: 15px;
}

.mobile-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ------------------------------------------- 断点与门户统一为 800px */
@media (max-width: 800px) {
  .download-hero {
    padding: 108px 24px 64px;
  }

  .download-hero h1 {
    font-size: 43px;
  }

  .download-content {
    padding: 56px 24px 72px;
  }

  .download-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .download-section-head h2 {
    font-size: 26px;
  }

  #download-status {
    text-align: left;
  }

  .edition-grid {
    grid-template-columns: 1fr;
  }
}
