/* ============================================================
   笔迹 biji.bj — 下载页（download.php）
   只在这一页加载：左文案 + 右手机样机，下面四张卡片、三步安装、
   本版更新与常见问题。颜色全部走 base.css 的 token，深浅色自动跟随。
   ============================================================ */

.dl-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px 72px;
}

/* ---------- 首屏 ---------- */

.dl-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: center;
  padding: 48px 0 52px;
}

.dl-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  color: var(--muted);
  letter-spacing: 0.16em;
}

.dl-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 16%, transparent);
}

.dl-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-weight: 800;
  color: var(--ink);
}

/* 「装进口袋」用手写体压一句，跟首页标题的写法呼应 */
.dl-copy h1 em {
  font-family: var(--font-hand);
  font-style: normal;
  font-weight: 400;
  font-size: 1.06em;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: linear-gradient(180deg, transparent 74%, var(--accent-soft) 74%, var(--accent-soft) 94%, transparent 94%);
  padding: 0 3px;
}

.dl-lead {
  margin: 0 0 26px;
  max-width: 30em;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.95;
}

.dl-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin: 0 0 30px;
  padding: 0;
}

.dl-facts > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.dl-facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.dl-facts dt {
  color: var(--muted);
  font-size: 12.5px;
}

.dl-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dl-actions .btn.is-off {
  opacity: 0.55;
  pointer-events: none;
}

.dl-hint {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* 扫码面板：点按钮才展开，避免首屏多一块嘈杂 */
.dl-qr-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  animation: dlFade 0.28s ease;
}

.dl-qr-panel[hidden] {
  display: none;
}

.dl-qr-panel canvas {
  flex: none;
  border-radius: 10px;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 0 0 1px var(--line);
}

.dl-qr-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dl-qr-text b {
  color: var(--ink);
  font-size: 14px;
}

.dl-qr-text span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.dl-qr-text code {
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes dlFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 手机样机 ---------- */

.dl-art {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.dl-art::before {
  content: "";
  position: absolute;
  inset: 6% 2% 4%;
  border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 45%, var(--accent-soft), transparent 72%);
  filter: blur(6px);
}

.dl-phone {
  position: relative;
  width: 300px;
  height: 610px;
  padding: 9px;
  border-radius: 44px;
  background: linear-gradient(160deg, var(--surface), var(--surface-3));
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line-strong);
  transform: rotate(-1.6deg);
}

.dl-phone-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
}

.dl-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dl-status-ico {
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.dl-appbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 8px;
  color: var(--ink);
}

.dl-appbar b {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.dl-appbar img {
  border-radius: 7px;
}

.dl-appbar-hint {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
}

.dl-screen {
  flex: 1;
  padding: 6px 14px 0;
  overflow: hidden;
}

.dl-note {
  margin-bottom: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dl-note h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.dl-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

.dl-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.dl-lines i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
}

.dl-lines i:first-child {
  width: 100%;
}

.dl-note-ghost {
  opacity: 0.55;
  box-shadow: none;
  background: var(--surface-2);
}

.dl-note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--faint);
  font-size: 10.5px;
}

.dl-tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 4px 12px;
}

.dl-tabbar span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.dl-tabbar svg {
  width: 20px;
  height: 20px;
}

.dl-tabbar .is-on {
  color: var(--accent);
  font-weight: 700;
}

/* 样机旁边飘的两张小签 */
.dl-chip {
  position: absolute;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  animation: dlFloat 7s ease-in-out infinite;
}

.dl-chip-top {
  top: 8%;
  right: -6px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.dl-chip-bottom {
  bottom: 12%;
  left: -14px;
  animation-delay: -3.2s;
}

@keyframes dlFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ---------- 通用区块 ---------- */

.dl-section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.dl-section-head {
  margin-bottom: 28px;
}

.dl-section-head .eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  letter-spacing: 0.16em;
}

.dl-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  font-weight: 780;
}

.dl-section-sub {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 12.5px;
}

/* ---------- 四张卡片 ---------- */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dl-card {
  padding: 24px 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dl-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.dl-ico svg {
  width: 21px;
  height: 21px;
}

.dl-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.005em;
}

.dl-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

@media (hover: hover) {
  .dl-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
}

/* ---------- 三步安装 ---------- */

.dl-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: dlstep;
}

.dl-steps li {
  position: relative;
  padding: 26px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.dl-step-no {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--font-hand);
  font-size: 30px;
  line-height: 1;
  opacity: 0.85;
}

.dl-steps h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 750;
}

.dl-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

/* ---------- 本版更新 ---------- */

.dl-notelist {
  margin: 0;
  padding: 22px 26px 22px 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 2.1;
}

.dl-notelist li::marker {
  color: var(--accent);
}

/* ---------- 常见问题 ---------- */

.dl-faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 2px;
}

.dl-faq details:first-of-type {
  border-top: 1px solid var(--line);
}

.dl-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 2px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.dl-faq summary::-webkit-details-marker {
  display: none;
}

.dl-faq summary::after {
  content: "+";
  flex: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 17px;
  transition: transform 0.24s ease;
}

.dl-faq details[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.dl-faq details p {
  margin: -4px 0 20px;
  max-width: 60em;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 2;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 980px) {
  .dl-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding: 36px 0 48px;
    text-align: center;
  }

  .dl-copy .eyebrow,
  .dl-facts,
  .dl-actions {
    justify-content: center;
  }

  .dl-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .dl-br {
    display: none;
  }

  .dl-art {
    transform: scale(0.92);
  }

  .dl-chip {
    display: none;
  }

  .dl-grid,
  .dl-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .dl-section {
    padding: 44px 0;
  }
}

@media (max-width: 560px) {
  .dl-main {
    padding: 0 18px 56px;
  }

  .dl-phone {
    width: 252px;
    height: 512px;
  }

  .dl-art {
    transform: none;
    padding: 4px 0 0;
  }

  /* 三行版本信息改成两行排布，去掉竖分隔线，居中更整齐 */
  .dl-facts {
    gap: 4px 18px;
  }

  .dl-facts > div {
    padding: 0;
    border-left: 0;
  }

  .dl-qr-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dl-chip,
  .dl-qr-panel {
    animation: none;
  }

  .dl-card {
    transition: none;
  }
}
