/* 什么是文件？ */

.file-story {
    color: var(--article-text-color);
    font-size: 14px;
    line-height: 1.6;
}

.file-story * { box-sizing: border-box; }
.file-story img { display: block; max-width: 100%; }
.file-story p { margin: 0 0 12px; }
.file-story strong { color: var(--article-heading-color); }
.file-story code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.file-section {
    margin-top: 22px;
    scroll-margin-top: 110px;
}

.file-story .file-section > h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 8px;
    color: var(--article-heading-color);
    font-size: 20px;
    line-height: 1.35;
    font-weight: 900;
}

.file-number {
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0752ff;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.file-key,
.file-note,
.file-warning {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
}

.file-key { background: #eaf5ff; }
.file-note { background: #fff8e5; }
.file-warning {
    border: 1px solid #ffd0dc;
    background: #fff2f6;
}

.file-key img,
.file-warning img {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    object-fit: contain;
}

.file-note__icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.file-story .file-key h3,
.file-story .file-note h3,
.file-story .file-warning h3 {
    margin: 0 0 4px;
    font-size: 15px;
}

.file-story .file-key h3 { color: #0752ff; }
.file-story .file-note h3 { color: #9a6800; }
.file-story .file-warning h3 { color: #d83265; }

.file-key p,
.file-note p,
.file-warning p { margin: 0; }

/* 文件是什么 */

.file-first {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
    margin-top: 14px;
}

.file-first > div {
    display: flex;
    min-height: 165px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 15px;
    text-align: center;
}

.file-first__photo { background: #eef5ff; }
.file-first__doc { background: #f3efff; }
.file-first__music { background: #eef9f0; }

.file-first > div > span {
    font-size: 52px;
}

.file-first__photo > span { color: #0752ff; }
.file-first__doc > span { color: #7654d6; }
.file-first__music > span { color: #2a9b55; }

.file-story .file-first h3 {
    margin: 7px 0 4px;
    color: var(--article-heading-color);
    font-size: 14px;
}

.file-first p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

/* 文件名 vs 内容 */

.file-name-content {
    display: grid;
    grid-template-columns: 1fr 55px 1fr;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.file-name-content__name,
.file-name-content__content {
    display: flex;
    min-height: 160px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 15px;
    text-align: center;
}

.file-name-content__name { background: #eef5ff; }
.file-name-content__content { background: #eef9f0; }

.file-name-content span {
    color: #617296;
    font-size: 10px;
}

.file-name-content strong {
    margin-top: 6px;
    color: #0752ff;
    font-size: 20px;
}

.file-name-content code {
    margin-top: 6px;
    padding: 7px 9px;
    border-radius: 8px;
    background: #fff;
    color: #2a9b55;
    font-size: 13px;
    font-weight: 900;
}

.file-name-content p {
    margin: 5px 0 0;
    color: #617296;
    font-size: 10px;
}

.file-name-content__arrow,
.file-storage__arrow,
.file-open-flow__arrow {
    color: #4f82ff;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

/* 文件住在哪里 */

.file-storage {
    display: grid;
    grid-template-columns: .9fr 45px 1.6fr;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.file-storage__file,
.file-storage__blocks {
    min-height: 200px;
    padding: 15px;
    border-radius: 15px;
    text-align: center;
}

.file-storage__file {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #eef5ff;
}

.file-storage__file > span {
    color: #0752ff;
    font-size: 60px;
}

.file-storage__blocks { background: #f7f8fc; }

.file-storage__blocks > div {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 6px;
}

.file-storage__blocks span {
    display: flex;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    color: #617296;
    font-size: 11px;
    font-weight: 900;
}

.file-storage__blocks span.is-used {
    background: #dce9ff;
    color: #0752ff;
}

.file-story .file-storage h3 {
    margin: 8px 0 4px;
    color: var(--article-heading-color);
    font-size: 14px;
}

.file-storage p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

/* 文件系统 */

.file-system,
.file-formats {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
    margin-top: 14px;
}

.file-system article,
.file-formats article,
.file-size article {
    min-width: 0;
    padding: 14px 10px;
    border: 1px solid #e1ebff;
    border-radius: 14px;
    background: #f9fbff;
    text-align: center;
}

.file-system article > span,
.file-formats article > span {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    border-radius: 19px;
    background: #eaf3ff;
    color: #0752ff;
    font-size: 27px;
}

.file-story .file-system h3,
.file-story .file-formats h3 {
    margin: 0 0 4px;
    color: var(--article-heading-color);
    font-size: 13px;
}

.file-system p,
.file-formats p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

/* 文件大小 */

.file-size {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
    margin-top: 14px;
}

.file-size article > span {
    display: inline-flex;
    min-width: 80px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eaf3ff;
    color: #0752ff;
    font-size: 16px;
    font-weight: 900;
}

.file-story .file-size h3 {
    margin: 8px 0 4px;
    color: var(--article-heading-color);
    font-size: 13px;
}

.file-size p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

.file-size-vs-disk {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    margin-top: 12px;
}

.file-size-vs-disk > div {
    padding: 14px;
    border-radius: 13px;
    background: #f3efff;
    text-align: center;
}

.file-size-vs-disk strong {
    display: block;
    color: #6049b8;
    font-size: 13px;
}

.file-size-vs-disk span {
    display: block;
    margin-top: 4px;
    color: #617296;
    font-size: 10px;
}

/* 打开保存 */

.file-open-flow {
    display: grid;
    grid-template-columns: 1fr 28px 1fr 28px 1fr;
    gap: 7px;
    align-items: center;
    margin-top: 14px;
}

.file-open-flow article {
    position: relative;
    min-width: 0;
    min-height: 185px;
    padding: 14px 8px;
    border: 1px solid #e1ebff;
    border-radius: 14px;
    background: #f9fbff;
    text-align: center;
}

.file-open-flow__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0752ff;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.file-open-flow article > i {
    margin: 16px 0 8px;
    color: #0752ff;
    font-size: 40px;
}

.file-story .file-open-flow h3 {
    margin: 0 0 4px;
    color: var(--article-heading-color);
    font-size: 13px;
}

.file-open-flow p {
    margin: 0;
    color: #617296;
    font-size: 10px;
}

.file-save-flow {
    display: grid;
    grid-template-columns: 1fr 40px 1fr 40px 1fr;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.file-save-flow span {
    padding: 12px 10px;
    border-radius: 11px;
    background: #eef9f0;
    color: #2f7048;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.file-save-flow b {
    color: #4f82ff;
    text-align: center;
}

/* 文件 vs 文件夹 */

.file-vs-folder {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
    margin-top: 14px;
}

.file-vs-folder > div {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 15px;
    text-align: center;
}

.file-vs-folder__file { background: #eef5ff; }
.file-vs-folder__folder { background: #fff6df; }

.file-vs-folder > div > span {
    font-size: 58px;
}

.file-vs-folder__file > span { color: #0752ff; }
.file-vs-folder__folder > span { color: #d58d00; }

.file-story .file-vs-folder h3 {
    margin: 8px 0 4px;
    color: var(--article-heading-color);
    font-size: 15px;
}

.file-vs-folder p {
    margin: 0;
    color: #617296;
    font-size: 11px;
}

.file-vs-folder small {
    display: block;
    margin-top: 4px;
    color: #8692a8;
    font-size: 9px;
}

/* 总结 */

.file-summary {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    padding: 18px;
    border-radius: 16px;
    background: #e9f3ff;
    scroll-margin-top: 110px;
}

.file-summary__icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    object-fit: contain;
}

.file-story .file-summary h2 {
    margin: 0 0 7px;
    color: #0752ff;
    font-size: 19px;
}

.file-summary ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.75;
}

.file-summary__next {
    margin: 10px 0 0 !important;
    padding-top: 10px;
    border-top: 1px dashed #b8d3f6;
}

.file-summary__next em {
    color: #0752ff;
    font-style: normal;
    font-weight: 800;
}

/* 翻页 */

.file-pagination {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
}

.file-pagination a {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 49%;
    padding: 10px 13px;
    border: 1px solid #d9e7ff;
    border-radius: 12px;
    background: #ffffffb3;
    text-decoration: none;
    box-shadow: 0 3px 10px #c5dbff30;
}

.file-pagination a:last-child { text-align: right; }

.file-pagination strong {
    display: block;
    color: #0752ff;
    font-size: 16px;
}

.file-pagination small {
    display: block;
    color: #576b9f;
    font-size: 12px;
}

.file-pagination__arrow {
    display: inline-flex;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e7ff;
    border-radius: 7px;
    color: #0752ff;
    font-size: 22px;
}

.file-pagination a:hover { background: #edf4ff; }

.file-pagination a:focus-visible {
    outline: 3px solid #0752ff;
    outline-offset: 3px;
}

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

@media (max-width: 640px) {
    .file-story {
        font-size: 12px;
        line-height: 1.6;
    }

    .file-section { margin-top: 18px; }

    .file-story .file-section > h2 {
        gap: 9px;
        margin-bottom: 6px;
        font-size: 16px;
    }

    .file-number {
        flex-basis: 31px;
        height: 31px;
        font-size: 14px;
    }

    .file-first,
    .file-size,
    .file-system,
    .file-formats {
        grid-template-columns: minmax(0,1fr);
        gap: 8px;
    }

    .file-name-content,
    .file-storage,
    .file-open-flow,
    .file-save-flow {
        grid-template-columns: minmax(0,1fr);
        gap: 7px;
    }

    .file-name-content__arrow,
    .file-storage__arrow,
    .file-open-flow__arrow,
    .file-save-flow b {
        transform: rotate(90deg);
        line-height: 1;
    }

    .file-key,
    .file-note,
    .file-warning {
        gap: 9px;
        padding: 11px 12px;
    }

    .file-key img,
    .file-warning img,
    .file-note__icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .file-size-vs-disk,
    .file-vs-folder {
        grid-template-columns: minmax(0,1fr);
        gap: 8px;
    }

    .file-open-flow article {
        min-height: auto;
    }

    .file-summary {
        gap: 8px;
        padding: 14px;
    }

    .file-summary__icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .file-story .file-summary h2 { font-size: 17px; }

    .file-pagination { gap: 9px; }

    .file-pagination a {
        flex: 1;
        min-width: 0;
        gap: 5px;
        padding: 8px 6px;
    }

    .file-pagination strong { font-size: 13px; }

    .file-pagination small {
        font-size: 10px;
        line-height: 1.35;
    }

    .file-pagination__arrow {
        width: 26px;
        height: 27px;
        flex-basis: 26px;
        font-size: 18px;
    }
}
