/* ============================================================
   票管大师官网 · 客户端下载页
   ============================================================ */

.site-nav > a.is-current {
    color: var(--brand);
    background: rgba(37, 99, 235, .08);
    font-weight: 600;
}

.dl-page { padding-top: 72px; }

/* ---------- 下载区 ---------- */
.dl-hero {
    position: relative;
    padding: 64px 0 88px;
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 84% -18%, rgba(96, 165, 250, .22), transparent 62%),
        radial-gradient(700px 380px at 4% 6%, rgba(79, 70, 229, .13), transparent 58%),
        #fff;
}
.dl-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -60px;
    bottom: -180px;
    background: #ddd6fe;
    opacity: .34;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.dl-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
    gap: 52px;
    align-items: center;
}

.dl-hero h1 {
    font-size: clamp(28px, 3.6vw, 42px);
    margin: 20px 0 14px;
    letter-spacing: -.03em;
}

/* ---------- 版本面板 ---------- */
.dl-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 30px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}
.dl-panel-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.dl-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.dl-version {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}
.dl-meta {
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.6;
    word-break: break-all;
}
.dl-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* 状态：取版本中 / 失败 —— 数字与按钮都退成灰态，避免误以为可以下载 */
.dl-panel[data-state="loading"] .dl-version { color: var(--ink-4); }
.dl-panel[data-state="error"] .dl-version { color: #b45309; font-size: 19px; }
.dl-panel[data-state="error"] .dl-meta { color: #b45309; }

a.is-disabled {
    pointer-events: none;
    cursor: default;
    opacity: .6;
    box-shadow: none;
    filter: grayscale(.4);
}

/* .btn 的 display 会盖掉 hidden 属性的 UA 样式，这里显式补回来 */
.dl-panel .btn[hidden] { display: none; }

.dl-hint {
    margin-top: 14px;
    max-width: 640px;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--ink-3);
}
.dl-hint a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- 其它端 ---------- */
.dl-clients {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dl-client {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: border-color .22s, box-shadow .22s, transform .22s var(--ease);
}
.dl-client:hover { border-color: #d9e3f5; box-shadow: var(--shadow); transform: translateY(-2px); }
.dl-client.is-disabled {
    background: #f8fafc;
    border-style: dashed;
    box-shadow: none;
    transform: none;
}
.dl-client.is-disabled:hover { border-color: var(--line); box-shadow: none; transform: none; }

.dl-client-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    color: var(--brand);
    background: linear-gradient(140deg, #eff5ff, #e8eefc);
}
.dl-client-icon svg { width: 21px; height: 21px; }
.dl-client.is-disabled .dl-client-icon {
    color: var(--ink-4);
    background: #f1f5f9;
}

.dl-client-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.dl-client-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
}
.dl-client.is-disabled .dl-client-name { color: var(--ink-4); }
.dl-client-tag {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-4);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 1px 8px;
}
.dl-client-desc {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ink-3);
}
.dl-client.is-disabled .dl-client-desc { color: var(--ink-4); }
.dl-client-btn { flex: none; padding: 7px 16px; font-size: 13.5px; }

/* ---------- 安装步骤 ---------- */
.dl-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.dl-step {
    padding: 26px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.dl-step-no {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
}
.dl-step h3 { font-size: 17px; margin-bottom: 8px; }
.dl-step p { font-size: 14px; color: var(--ink-3); line-height: 1.7; }

/* ---------- 运行环境 ---------- */
.dl-specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}
.dl-spec {
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-soft);
}
.dl-spec dt {
    font-size: 12px;
    color: var(--ink-4);
    letter-spacing: .04em;
}
.dl-spec dd {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
}

.dl-note {
    margin-top: 28px;
    padding: 20px 24px;
    border: 1px solid #e2eaf8;
    border-radius: var(--radius);
    background: linear-gradient(118deg, #eff5ff 0%, #f6f3ff 100%);
    font-size: 14px;
    line-height: 1.85;
    color: var(--ink-2);
}
.dl-note strong { color: var(--ink); }

/* ---------- FAQ ---------- */
.dl-faq .section-head p a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.dl-faq .faq-list {
    max-width: 900px;
    border-top: 1px solid var(--line);
}
.dl-faq .faq-answer code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #eef3fd;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
    font-size: 13px;
    color: var(--ink-2);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
    .dl-hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .dl-clients { max-width: 620px; }
}

@media (max-width: 900px) {
    .dl-steps { grid-template-columns: 1fr; }
    .dl-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .dl-page { padding-top: 64px; }
    .dl-hero { padding: 40px 0 64px; }
    .dl-panel { padding: 16px 18px; }
    .dl-actions { width: 100%; }
    .dl-actions .btn { flex: 1; }
    .dl-version { font-size: 21px; }
    .dl-panel[data-state="error"] .dl-version { font-size: 17px; }
    .dl-specs { grid-template-columns: 1fr; }
    .dl-note { padding: 18px 20px; }
    .dl-client { padding: 14px 16px; }
}
