/* =========================================================
   下载中心 - Design Token
   ========================================================= */
:root {
    /* 品牌与状态色 */
    --c-brand: #174592;
    --c-brand-dark: #174592;
    --c-brand-soft: #eaf2fe;
    --c-danger: #d92d20;
    --c-success: #12805c;

    /* 中性色 */
    --c-text: #1f2937;
    --c-text-2: #6b7280;
    --c-text-3: #9ca3af;
    --c-bg: #f5f7fa;
    --c-surface: #ffffff;
    --c-border: #e5e7eb;
    --c-border-strong: #d1d5db;

    /* 间距 */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;

    /* 字号 */
    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-base: 14px;
    --fs-md: 16px;
    --fs-lg: clamp(20px, 4vw, 26px);
    --fs-xl: clamp(24px, 5vw, 34px);

    /* 圆角与阴影 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-2: 0 4px 16px rgba(16, 24, 40, .08);
    --shadow-3: 0 20px 48px rgba(16, 24, 40, .18);

    --header-h: 0px;
}

/* =========================================================
   基础重置
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
}

h1,
h2,
h3,
p {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
}


.downListBox1 .page {
    display: block;
}

.w1200 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-4);
}

/* =========================================================
   下载列表
   ========================================================= */
.downListBox1 {
    padding: var(--sp-6) 0 var(--sp-7);
}

.dl-head {
    margin-bottom: var(--sp-5);
    text-align: center;
}

.dl-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--c-text);
}

.dl-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin: var(--sp-3) auto 0;
    border-radius: 2px;
    background: var(--c-brand);
}

.dl-desc {
    margin-top: var(--sp-3);
    font-size: var(--fs-base);
    color: var(--c-text-2);
}

/* 列表固定一排 2 个 */
.dl-list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--sp-3);
}

/* 列表项 */
.downListBox1 .item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
    padding: var(--sp-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    box-shadow: var(--shadow-1);
    cursor: pointer;
    text-align: left;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.downListBox1 .item:hover {
    transform: translateY(-2px);
    border-color: var(--c-brand);
    box-shadow: var(--shadow-2);
}

.downListBox1 .item:active {
    transform: translateY(0);
}

/* 文件图标 */
.downListBox1 .icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--c-brand-soft);
}

.downListBox1 .icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--c-brand);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 文件信息 */
.downListBox1 .info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.downListBox1 .name {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--c-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.downListBox1 .meta,
.downListBox1 .time {
    font-size: var(--fs-xs);
    color: var(--c-text-3);
}

/* 下载动作 */
.downListBox1 .action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-2) var(--sp-3);
    border-radius: 999px;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--c-brand);
    background: var(--c-brand-soft);
    white-space: nowrap;
}

.downListBox1 .action::after {
    content: "";
    width: 14px;
    height: 14px;
    background: var(--c-brand);
    clip-path: polygon(45% 0, 45% 60%, 20% 60%, 50% 100%, 80% 60%, 55% 60%, 55% 0);
}

/* 平板：两列 */
@media (min-width: 768px) {
    .downListBox1 {
        padding: var(--sp-7) 0 var(--sp-7);
    }

    .dl-list {
        grid-template-columns: repeat(1, 1fr);
        gap: var(--sp-4);
    }

    .downListBox1 .item {
        padding: var(--sp-3);
    }

    .downListBox1 .name {
        font-size: var(--fs-md);
    }
}

/* 桌面：保持 2 列，增大间距 */
@media (min-width: 1024px) {
    .downListBox1 .w1200 {
        padding: 0 var(--sp-5);
    }

    .downListBox1 .dl-list {
        gap: var(--sp-5);
    }
}

/* =========================================================
   弹窗
   ========================================================= */
.dl-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.dl-modal[hidden] {
    display: none;
}

.dl-modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .55);
    animation: dlFade .2s ease;
}

/* 手机端：底部抽屉，占满整屏高度并内置滚动，兼容刘海屏与安全区 */
.dl-modal__dialog {
    position: relative;
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: calc(var(--sp-5) + env(safe-area-inset-top)) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom));
    padding-left: calc(var(--sp-4) + env(safe-area-inset-left));
    padding-right: calc(var(--sp-4) + env(safe-area-inset-right));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--c-surface);
    box-shadow: var(--shadow-3);
    animation: dlUp .25s ease;
}

/* 关闭按钮 */
.dl-modal__close {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--c-bg);
    color: var(--c-text-2);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.dl-modal__close:hover {
    background: var(--c-border);
    color: var(--c-text);
}

.dl-modal__close svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.dl-modal__head {
    margin-bottom: var(--sp-4);
    padding-right: var(--sp-6);
}

.dl-modal__title {
    font-size: var(--fs-lg);
    font-weight: 700;
}

.dl-modal__file {
    margin-top: var(--sp-1);
    font-size: var(--fs-sm);
    color: var(--c-text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   表单
   ========================================================= */
.dl-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
}

.dl-field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.dl-field label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-text);
}

.dl-field label em {
    font-style: normal;
    color: var(--c-danger);
}

.dl-field input,
.dl-field textarea {
    width: 100%;
    padding: 12px var(--sp-3);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    font-size: 16px;
    /* 16px 避免 iOS 聚焦时自动放大 */
    color: var(--c-text);
    background: var(--c-surface);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.dl-field textarea {
    min-height: 84px;
    resize: vertical;
}

.dl-field input:focus,
.dl-field textarea:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px var(--c-brand-soft);
}

.dl-field.is-error input,
.dl-field.is-error textarea {
    border-color: var(--c-danger);
}

.dl-field.is-error input:focus,
.dl-field.is-error textarea:focus {
    box-shadow: 0 0 0 3px rgba(217, 45, 32, .12);
}

.dl-err {
    font-size: var(--fs-xs);
    color: var(--c-danger);
}

.dl-err:empty {
    display: none;
}

.dl-form__tip {
    margin-top: var(--sp-3);
    font-size: var(--fs-xs);
    color: var(--c-text-3);
}

.dl-form__foot {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    margin-top: var(--sp-4);
}

.dl-form__foot .dl-btn {
    width: 100%;
}

/* 按钮 */
.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 var(--sp-5);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: var(--fs-md);
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.dl-btn--primary {
    color: #fff;
    background: var(--c-brand);
}

.dl-btn--primary:hover {
    background: var(--c-brand-dark);
}

.dl-btn--primary[disabled] {
    opacity: .65;
    cursor: not-allowed;
}

.dl-btn--ghost {
    color: var(--c-text-2);
    background: var(--c-surface);
    border-color: var(--c-border-strong);
}

.dl-btn--ghost:hover {
    color: var(--c-text);
    border-color: var(--c-text-3);
}

/* =========================================================
   成功状态
   ========================================================= */
.dl-success {
    padding: var(--sp-5) var(--sp-2);
    text-align: center;
}

.dl-success[hidden] {
    display: none;
}

.dl-success__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto var(--sp-3);
    border-radius: 50%;
    background: rgba(18, 128, 92, .1);
}

.dl-success__icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--c-success);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dl-success__title {
    font-size: var(--fs-md);
    font-weight: 700;
}

.dl-success__desc {
    margin: var(--sp-2) 0 var(--sp-5);
    font-size: var(--fs-sm);
    color: var(--c-text-2);
}

.dl-success__desc a {
    color: var(--c-brand);
}

/* =========================================================
   弹窗动画
   ========================================================= */
@keyframes dlFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes dlUp {
    from {
        transform: translateY(24px);
        opacity: .4;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 平板及以上：弹窗居中卡片 */
@media (min-width: 768px) {
    .dl-modal {
        align-items: center;
        padding: var(--sp-5);
    }

    .dl-modal__dialog {
        width: auto;
        height: auto;
        max-width: 560px;
        max-height: 88vh;
        padding: var(--sp-6);
        padding-left: var(--sp-6);
        padding-right: var(--sp-6);
        border-radius: var(--radius-lg);
        animation: dlPop .22s ease;
    }

    .dl-modal__close {
        top: var(--sp-4);
        right: var(--sp-4);
    }

    .dl-form__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dl-field--full {
        grid-column: 1 / -1;
    }

    .dl-form__foot {
        flex-direction: row;
        justify-content: flex-end;
    }

    .dl-form__foot .dl-btn {
        width: auto;
        min-width: 120px;
    }


}

@media (max-width: 768px) {
    .dl-list {
        grid-template-columns: repeat(1, 1fr);
    }
}

@keyframes dlPop {
    from {
        transform: scale(.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* 弹窗打开时锁定滚动 */
body.dl-locked {
    overflow: hidden;
}