/* ─────────────────────────────────────────────────────────────
   下载页专用版式（landing 表面）—— 只消费 landing.css 的 token，不新造一套配色。

   为什么单独一个文件：CSP 是 `style-src 'self'`（app/security.py），模板里不能写内联
   <style>；而 landing.css 是全站共用文件（另一个席位也在改），下载页的栅格/校验块
   放进去只会让公共文件互相踩。这里只加 `.dl-*` 命名空间，加载顺序在 landing.css 之后。

   载入方式：templates/public/download.html 通过 head_landing 的 {{#extra_css}} 钩子声明。
   ───────────────────────────────────────────────────────────── */

/* 1. 页面骨架：顶部留白与首页 section 的节奏一致（56/44/32） */
.landing .dl-page{padding:0 0 96px}
.landing .dl-hero{padding:56px 0 30px;border-bottom:1px solid var(--line);margin:0 0 32px}
.landing .dl-hero h1{
  margin:0 0 14px;font-size:clamp(32px,4.4vw,52px);line-height:1.06;
  letter-spacing:-.02em;font-weight:650;color:var(--ink)
}
.landing .dl-hero .lede{margin:0;max-width:66ch;font-size:clamp(15px,1.3vw,17px);line-height:1.75;color:var(--ink-2)}

/* 2. 版本 / 阶段提示条 */
.landing .dl-version{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;margin:0 0 40px;
  padding:14px 18px;border:1px solid rgba(240,197,107,.3);border-radius:14px;
  background:rgba(240,197,107,.07);color:var(--ink-2);font-size:13.5px;line-height:1.7
}
.landing .dl-version strong{color:var(--ink);font-weight:650}
.landing .dl-version code{
  padding:2px 7px;border-radius:6px;background:rgba(240,197,107,.12);
  color:var(--amber);font-family:var(--mono);font-size:12px
}
.landing .dl-version-note{flex:1 1 260px;min-width:0;color:var(--ink-2)}
/* 版本条分隔符：内测构建 · v0.2.0 · 清单生成于 …（无重复「版本」字样） */
.landing .dl-version strong+span:before,
.landing .dl-version span+span:before{content:"·";margin-right:10px;color:var(--ink-3)}

/* 3. 分区标题 */
.landing .dl-section{padding:0 0 44px}
.landing .dl-section-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 16px;margin:0 0 18px}
.landing .dl-section-head h2{margin:0;font-size:clamp(20px,2.1vw,26px);line-height:1.25;letter-spacing:-.01em}
.landing .dl-section-head p{margin:0;color:var(--ink-3);font-size:13px;line-height:1.6}

/* 4. 四平台卡片栅格：1440 四列 / 平板两列 / 390 单列，卡片最小 250px 不挤字 */
.landing .dl-grid{
  display:grid;gap:16px;align-items:stretch;margin:0;padding:0;list-style:none;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr))
}
.landing .dl-grid{align-items:start}
.landing .dl-card{
  display:flex;flex-direction:column;gap:12px;min-width:0;position:relative;overflow:hidden;
  padding:20px;border:1px solid var(--line);border-radius:var(--radius);
  background:linear-gradient(180deg,rgba(29,25,51,.78),rgba(21,19,39,.78));
  box-shadow:0 18px 48px rgba(5,4,12,.28)
}
.landing .dl-card:before{
  content:"";position:absolute;inset:0 0 auto;height:1px;
  background:linear-gradient(90deg,transparent,rgba(143,217,190,.38),transparent)
}
.landing .dl-card.is-pending{
  border-style:dashed;border-color:var(--line-strong);
  background:rgba(21,19,39,.45);box-shadow:none
}
.landing .dl-card.is-pending:before{background:none}

/* 5. 卡片头：平台名 + 状态徽标 */
.landing .dl-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.landing .dl-card-top h3{margin:0;font-size:17px;line-height:1.3;letter-spacing:-.01em;color:var(--ink)}
.landing .dl-badge{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:999px;
  border:1px solid var(--line-strong);font-family:var(--mono);font-size:9.5px;
  letter-spacing:.1em;text-transform:uppercase;white-space:nowrap
}
.landing .dl-badge-live{border-color:rgba(143,217,190,.38);color:var(--mint);background:rgba(143,217,190,.08)}
.landing .dl-badge-pending{border-color:rgba(240,197,107,.34);color:var(--amber);background:rgba(240,197,107,.07)}
.landing .dl-req{margin:0;color:var(--ink-3);font-size:12.5px;line-height:1.6}

/* 6. 包信息行：key 用等宽小字，value 允许长串换行（sha/文件名不撑破卡片） */
/* 包体撑满卡片剩余高度，CTA 才能四张卡一起贴底（grid 行内卡片等高，见 .dl-grid） */
.landing .dl-pkg{display:flex;flex-direction:column;gap:10px;min-width:0;flex:1 1 auto}
.landing .dl-meta{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 12px;margin:0;font-size:12.5px;line-height:1.55}
.landing .dl-meta dt{
  color:var(--ink-3);font-family:var(--mono);font-size:10px;letter-spacing:.07em;
  text-transform:uppercase;padding-top:2px;white-space:nowrap
}
.landing .dl-meta dd{margin:0;min-width:0;color:var(--ink-2);overflow-wrap:anywhere}
.landing .dl-note{margin:0;color:var(--ink-3);font-size:12px;line-height:1.7;overflow-wrap:anywhere}

/* 7. 校验值：<details> 折叠，展开后整段可换行复制 */
.landing .dl-sha{margin:0;border-top:1px solid var(--line);padding-top:9px}
.landing .dl-sha summary{
  cursor:pointer;color:var(--ink-3);font-family:var(--mono);font-size:10.5px;
  letter-spacing:.08em;text-transform:uppercase;list-style:none
}
.landing .dl-sha summary::-webkit-details-marker{display:none}
.landing .dl-sha summary:before{content:"▸ ";color:var(--mint)}
.landing .dl-sha[open] summary:before{content:"▾ "}
.landing .dl-sha summary:hover{color:var(--mint)}
.landing .dl-sha code{
  display:block;margin-top:8px;padding:9px 10px;border-radius:9px;
  background:rgba(143,217,190,.08);color:var(--mint-2);font-family:var(--mono);
  font-size:11px;line-height:1.6;white-space:normal;overflow-wrap:anywhere;word-break:break-all
}

/* 8. 下载按钮：贴卡片底部对齐；390 下整宽，不贴边（卡片自带 16px 内边距） */
.landing .dl-cta{margin:auto 0 0}
.landing .dl-cta .btn{width:100%;justify-content:center;min-height:46px;font-size:14px}
.landing .dl-pending-note{margin:0;color:var(--ink-3);font-size:12.5px;line-height:1.75}
.landing .dl-pending-note b{display:block;margin-bottom:4px;color:var(--ink-2);font-weight:600}

/* 9. 校验清单面板 */
.landing .dl-panel{
  border:1px solid var(--line);border-radius:var(--radius);padding:20px 22px;
  background:rgba(21,19,39,.6);min-width:0
}
.landing .dl-verify{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.landing .dl-verify li{
  display:grid;grid-template-columns:minmax(110px,.26fr) minmax(0,1fr);gap:8px 14px;
  padding:0 0 10px;border-bottom:1px solid var(--line);font-size:12.5px;line-height:1.6
}
.landing .dl-verify li:last-child{border-bottom:0;padding-bottom:0}
.landing .dl-verify .dl-verify-name{color:var(--ink);font-weight:600}
.landing .dl-verify code{
  color:var(--mint-2);font-family:var(--mono);font-size:11px;overflow-wrap:anywhere;word-break:break-all
}
.landing .dl-verify span{color:var(--ink-3)}
.landing .dl-empty{margin:0;color:var(--ink-3);font-size:13px;line-height:1.7}

/* 10. 安装步骤：复用 landing.css 的 .steps/.step-no，只补窄屏单列 */
.landing .dl-steps{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));margin:0}
.landing .dl-steps li{font-size:14px;line-height:1.7;color:var(--ink-2)}

/* 11. 源码 / 文档出口 */
.landing .dl-links{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0 0}
.landing .dl-links .btn{min-height:46px}

/* 12. 焦点可见：键盘用户在这页的每个可操作元素上都能看到焦点环 */
.landing .dl-page a:focus-visible,
.landing .dl-page button:focus-visible,
.landing .dl-page summary:focus-visible{outline:2px solid var(--mint);outline-offset:3px;border-radius:8px}

/* 13. 移动端 390：单列、整宽按钮、校验值换行，不出现横向滚动 */
@media(max-width:680px){
  .landing .dl-page{padding-bottom:72px}
  .landing .dl-hero{padding:34px 0 22px;margin-bottom:24px}
  .landing .dl-version{margin-bottom:28px;padding:12px 14px;font-size:12.5px}
  .landing .dl-card{padding:16px}
  .landing .dl-meta{grid-template-columns:1fr;gap:2px}
  .landing .dl-meta dt{padding-top:6px}
  .landing .dl-verify li{grid-template-columns:1fr}
  .landing .dl-section{padding-bottom:34px}
}

/* 14. 无障碍：禁用动效时不做任何过渡/位移 */
@media(prefers-reduced-motion:reduce){
  .landing .dl-card,.landing .dl-sha summary{transition:none}
  .landing .dl-page .btn:hover{transform:none}
}

/* 绑定网页端小节：编号步骤 + 命令行等价写法 + 双入口按钮 */
.landing .dl-cli{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline;margin:14px 0 0;
  font-family:var(--mono);font-size:11px}
.landing .dl-cli-label{color:var(--ink-3);letter-spacing:.04em}
.landing .dl-cli code{padding:3px 8px;border:1px solid var(--line);border-radius:6px;
  background:rgba(143,217,190,.06);color:var(--ink);font-size:11px}
.landing .dl-note{margin:12px 0 0;font-size:11.5px;line-height:1.7;color:var(--ink-3)}
.landing .dl-section .dl-panel .dl-links{margin-top:14px}

/* 同一平台多包：第一个包是主按钮，其余只做次级文字入口（macOS 不再出现两个下载按钮） */
.landing .dl-alt{margin:-2px 0 0;font-size:11.5px;line-height:1.6;color:var(--ink-3)}
.landing .dl-alt a{color:var(--ink-2);border-bottom:1px solid var(--line-strong);padding-bottom:1px}
.landing .dl-alt a:hover{color:var(--mint);border-color:var(--mint)}

/* ── 日间模式：下载卡片/面板/版本条换成浅色实体 ── */
html[data-theme="day"] .landing .dl-card{background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(250,247,254,.9));box-shadow:0 12px 32px rgba(27,21,48,.07)}
html[data-theme="day"] .landing .dl-card:before{background:linear-gradient(90deg,transparent,rgba(47,125,102,.30),transparent)}
html[data-theme="day"] .landing .dl-card.is-pending{background:rgba(255,255,255,.62)}
html[data-theme="day"] .landing .dl-panel{background:rgba(255,255,255,.72)}
html[data-theme="day"] .landing .dl-version{background:rgba(240,197,107,.14);border-color:rgba(154,106,22,.24)}
html[data-theme="day"] .landing .dl-version code{background:rgba(240,197,107,.18);color:#7A520F}
html[data-theme="day"] .landing .dl-badge-live{border-color:rgba(47,125,102,.30);background:rgba(47,125,102,.08)}
html[data-theme="day"] .landing .dl-badge-pending{border-color:rgba(154,106,22,.28);background:rgba(240,197,107,.14)}
html[data-theme="day"] .landing .dl-sha code{background:rgba(47,125,102,.08);color:var(--mint)}

/* 官方特供版槽位（CR-20261106-OFFICIAL-SUPPLY-01，2026-11-06）：副标题 + 能力要点。
   只加两条：不改既有卡片/CTA 规则，其它槽位没有 desc / caps 字段时不会渲染这两个元素。 */
.landing .dl-desc{margin:6px 0 0;color:var(--ink-2);font-size:12.5px;line-height:1.6}
.landing .dl-caps{margin:8px 0 0;font-size:11.5px;letter-spacing:.01em}
