/* 下载中心（/downloads/）
   只在本页加载：/downloads/index.php 里 $pageStyles = ['css/site-downloads.css']
   复用 site.css 的 token（--gold / --bg-elevated / --border / --radius），不另立一套皮肤。 */

.dl-hero {
  padding-bottom: 36px;
  margin-bottom: 40px;
}

.dl-hero .lead {
  margin-left: auto;
  margin-right: auto;
}

.dl-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dl-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dl-hero-meta strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- 资料卡 ---------- */

.dl-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 分线方案：4 份，桌面端两列排布，避免第 4 张单独占一行 */
.dl-grid--lines {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

@media (max-width: 900px) {
  .dl-grid--lines {
    grid-template-columns: 1fr;
  }
}

.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.dl-card:hover {
  border-color: rgba(201, 162, 39, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.dl-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dl-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--gold-dim);
  border: 1px solid rgba(201, 162, 39, 0.28);
  color: var(--gold-light);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.dl-card-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.dl-card h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.dl-card-sub {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.dl-card-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.dl-filemeta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.dl-filemeta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dl-filemeta dt,
.dl-filemeta .dl-k {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.dl-filemeta dd,
.dl-filemeta .dl-v {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}

.dl-outline {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.dl-outline li {
  position: relative;
  padding-left: 14px;
  line-height: 1.65;
}

.dl-outline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.75;
}

.dl-card-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  border-left: 2px solid rgba(201, 162, 39, 0.4);
  padding-left: 10px;
  margin-bottom: 18px;
}

.dl-card .btn-row {
  margin-top: auto;
  gap: 10px;
}

.dl-card .btn {
  flex: 1 1 auto;
  justify-content: center;
}

.dl-card .btn[aria-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- 使用建议表 ---------- */

.dl-how {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: dl-how;
}

.dl-how-step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.dl-how-step::before {
  counter-increment: dl-how;
  content: '0' counter(dl-how);
  display: block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
}

.dl-how-step h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  margin-bottom: 6px;
}

.dl-how-step p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.dl-how-step a {
  color: var(--gold-light);
}

/* ---------- 按店型 ---------- */

.dl-pick {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.dl-pick-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.dl-pick-item strong {
  font-size: 0.95rem;
}

.dl-pick-item .dl-pick-line {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}

.dl-pick-item p {
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.dl-pick-item a {
  font-size: 0.84rem;
  color: var(--gold-light);
  margin-top: auto;
}

/* ---------- 授权说明 ---------- */

.dl-notes {
  display: grid;
  gap: 14px 28px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.dl-notes div {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.dl-notes h3 {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.dl-notes p {
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .dl-card {
    padding: 22px 18px;
  }
  .dl-filemeta {
    grid-template-columns: minmax(0, 1fr);
  }
}
