/* KB、MB、GB、TB 到底有多大？ */

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

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

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

.size-story .size-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;
}

.size-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;
}

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

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

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

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

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

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

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

/* 单位阶梯 */

.size-ladder {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f7f8fc;
}

.size-ladder > div {
    min-width: 105px;
    padding: 12px 10px;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.size-ladder strong {
    display: block;
    color: #0752ff;
    font-size: 18px;
}

.size-ladder span {
    color: #617296;
    font-size: 10px;
}

.size-ladder b {
    color: #6f83a8;
    font-size: 18px;
}

/* 十进制单位 */

.size-decimal,
.size-binary,
.size-life,
.size-estimate {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
    margin-top: 14px;
}

.size-decimal article,
.size-binary article,
.size-life article,
.size-estimate article {
    min-width: 0;
    padding: 14px 9px;
    border: 1px solid #e1ebff;
    border-radius: 14px;
    background: #f9fbff;
    text-align: center;
}

.size-decimal__symbol {
    display: inline-flex;
    min-width: 72px;
    height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 13px;
    background: #eaf3ff;
    color: #0752ff;
    font-size: 18px;
    font-weight: 900;
}

.size-decimal strong,
.size-binary strong {
    display: block;
    margin-top: 8px;
    font-size: 13px;
}

.size-decimal p,
.size-binary p {
    margin: 3px 0 0;
    color: #617296;
    font-size: 10px;
}

.size-rule,
.size-conversion,
.size-estimate-rule {
    display: flex;
    gap: 11px;
    align-items: center;
    margin-top: 12px;
    padding: 13px 15px;
    border-radius: 14px;
}

.size-rule { background: #eef5ff; }
.size-conversion { background: #eef9f0; }
.size-estimate-rule { background: #f3efff; }

.size-rule > span,
.size-conversion > span,
.size-estimate-rule > span {
    font-size: 28px;
}

.size-rule > span { color: #0752ff; }
.size-conversion > span { color: #2a9b55; }
.size-estimate-rule > span { color: #7654d6; }

.size-rule p,
.size-conversion p,
.size-estimate-rule p { margin: 0; }

/* 二进制单位 */

.size-binary article {
    background: #f3efff;
}

.size-binary span {
    display: block;
    color: #7654d6;
    font-size: 18px;
    font-weight: 900;
}

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

.size-compare > div {
    padding: 15px;
    border-radius: 14px;
    background: #f7f8fc;
    text-align: center;
}

.size-compare strong {
    display: block;
    margin-bottom: 7px;
    color: var(--article-heading-color);
    font-size: 14px;
}

.size-compare code {
    display: block;
    padding: 7px;
    border-radius: 8px;
    background: #fff;
    color: #1d3d75;
    font-size: 11px;
    font-weight: 800;
}

.size-compare span {
    display: block;
    margin-top: 6px;
    color: #617296;
    font-size: 10px;
}

/* 生活里的大小 */

.size-life 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;
}

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

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

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

/* 硬盘容量 */

.size-disk-formula,
.size-disk-result {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
}

.size-disk-formula { background: #f7f8fc; }
.size-disk-result { background: #eef9f0; }

.size-disk-formula code {
    color: #1d3d75;
    font-size: 14px;
    font-weight: 900;
}

.size-disk-result strong {
    color: #2a9b55;
    font-size: 22px;
}

.size-disk-compare {
    display: grid;
    grid-template-columns: 1fr 120px 1fr;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.size-disk-compare > div:not(.size-disk-compare__same) {
    display: flex;
    min-height: 150px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 15px;
    text-align: center;
}

.size-disk-compare > div:first-child { background: #eef5ff; }
.size-disk-compare > div:last-child { background: #f3efff; }

.size-disk-compare span {
    color: #617296;
    font-size: 10px;
}

.size-disk-compare strong {
    margin: 5px 0;
    font-size: 24px;
}

.size-disk-compare small {
    color: #8692a8;
    font-size: 9px;
}

.size-disk-compare__same {
    color: #7485a3;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

/* bit vs Byte */

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

.size-bit-byte > div {
    padding: 16px;
    border-radius: 15px;
    text-align: center;
}

.size-bit-byte__byte { background: #eef5ff; }
.size-bit-byte__bit { background: #eef9f0; }

.size-bit-byte__symbol {
    display: inline-flex;
    min-width: 92px;
    height: 56px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 15px;
    background: #fff;
    font-size: 20px;
    font-weight: 900;
}

.size-bit-byte__byte .size-bit-byte__symbol { color: #0752ff; }
.size-bit-byte__bit .size-bit-byte__symbol { color: #2a9b55; }

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

.size-bit-byte p {
    margin: 0;
    color: #617296;
    font-size: 11px;
}

/* 估算 */

.size-estimate article > span {
    display: inline-flex;
    min-width: 62px;
    height: 52px;
    align-items: center;
    justify-content: center;
    margin-bottom: 7px;
    border-radius: 15px;
    background: #eaf3ff;
    color: #0752ff;
    font-size: 18px;
    font-weight: 900;
}

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

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

/* 总结 */

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

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

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

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

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

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

/* 翻页 */

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

.size-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;
}

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

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

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

.size-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;
}

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

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

@media (max-width: 900px) {
    .size-decimal,
    .size-binary,
    .size-life,
    .size-estimate {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

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

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

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

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

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

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

    .size-decimal,
    .size-binary,
    .size-life,
    .size-estimate {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px;
    }

    .size-compare,
    .size-bit-byte {
        grid-template-columns: minmax(0,1fr);
        gap: 8px;
    }

    .size-disk-compare {
        grid-template-columns: minmax(0,1fr);
        gap: 7px;
    }

    .size-disk-compare__same {
        padding: 4px;
    }

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

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

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

    .size-pagination { gap: 9px; }

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

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

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

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