/* 内存的作用是什么？ */

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

.ram-story * {
    box-sizing: border-box;
}

.ram-story img {
    display: block;
    max-width: 100%;
}

.ram-story p {
    margin: 0 0 12px;
}

.ram-story strong {
    color: var(--article-heading-color);
}

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

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

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

/* 工作台比喻 */

.ram-desk {
    display: grid;
    grid-template-columns: 1fr 52px 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}

.ram-desk__storage,
.ram-desk__memory {
    display: flex;
    min-height: 185px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 16px;
    text-align: center;
}

.ram-desk__storage {
    background: #eef5ff;
}

.ram-desk__memory {
    background: #f3efff;
}

.ram-desk__storage > span,
.ram-desk__memory > span {
    display: inline-flex;
    width: 78px;
    height: 78px;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: #fff;
    font-size: 34px;
}

.ram-desk__storage > span {
    color: #0752ff;
}

.ram-desk__memory > span {
    color: #7654d6;
}

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

.ram-desk p {
    margin: 0;
}

.ram-desk small {
    margin-top: 3px;
    color: #71809f;
    font-size: 11px;
}

.ram-desk__arrow {
    color: #4f82ff;
    font-size: 30px;
    font-weight: 900;
    text-align: center;
}

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

.ram-key {
    background: #eaf5ff;
}

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

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

.ram-story .ram-key h3 {
    color: #0752ff;
}

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

/* 程序进入内存 */

.ram-load-flow {
    display: grid;
    grid-template-columns: 1fr 30px 1fr 30px 1fr;
    gap: 6px;
    align-items: center;
    margin-top: 14px;
}

.ram-load-flow article {
    position: relative;
    min-width: 0;
    min-height: 205px;
    padding: 15px 10px 12px;
    border: 1px solid #e2ebff;
    border-radius: 15px;
    background: #f9fbff;
    text-align: center;
}

.ram-load-flow__badge {
    position: absolute;
    top: 9px;
    left: 9px;
    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0752ff;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.ram-load-flow article > img,
.ram-load-flow__icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin: 12px auto 7px;
}

.ram-load-flow__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #f3efff;
    color: #7654d6;
    font-size: 31px;
}

.ram-story .ram-load-flow h3 {
    margin: 0 0 5px;
    color: var(--article-heading-color);
    font-size: 14px;
}

.ram-load-flow p {
    margin: 0;
    color: #607296;
    font-size: 11px;
}

.ram-load-flow__arrow {
    color: #4f82ff;
    font-size: 23px;
    font-weight: 900;
    text-align: center;
}

.ram-note {
    background: #fff8e5;
}

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

.ram-story .ram-note h3 {
    color: #9a6800;
}

/* 内存 vs 硬盘 */

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

.ram-compare > div {
    min-width: 0;
    padding: 16px;
    border-radius: 16px;
}

.ram-compare__memory {
    background: #f3efff;
}

.ram-compare__storage {
    background: #eef5ff;
}

.ram-story .ram-compare h3 {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0 0 8px;
    color: var(--article-heading-color);
    font-size: 16px;
}

.ram-compare__memory h3 i {
    color: #7654d6;
}

.ram-compare__storage h3 i {
    color: #0752ff;
}

.ram-compare ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.ram-compare-tip {
    display: flex;
    gap: 11px;
    align-items: center;
    margin-top: 12px;
    padding: 13px 15px;
    border-radius: 14px;
    background: #eef9f0;
}

.ram-compare-tip > span {
    color: #e5a000;
    font-size: 28px;
}

.ram-compare-tip p {
    margin: 0;
}

/* CPU 与内存 */

.ram-cpu {
    display: grid;
    grid-template-columns: 1fr 150px 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}

.ram-cpu__memory,
.ram-cpu__processor {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 16px;
    text-align: center;
}

.ram-cpu__memory {
    background: #f3efff;
}

.ram-cpu__processor {
    background: #eef5ff;
}

.ram-cpu__memory > span {
    color: #7654d6;
    font-size: 62px;
}

.ram-cpu__processor img {
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.ram-story .ram-cpu h3 {
    margin: 7px 0 4px;
    color: var(--article-heading-color);
    font-size: 16px;
}

.ram-cpu p {
    margin: 0;
    color: #617296;
    font-size: 12px;
}

.ram-cpu__exchange {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #4f82ff;
    text-align: center;
}

.ram-cpu__exchange span {
    color: #6b7d9e;
    font-size: 11px;
}

.ram-cpu__exchange strong {
    color: #4f82ff;
    font-size: 34px;
}

.ram-mini-example {
    margin-top: 13px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f7f8fc;
}

.ram-story .ram-mini-example h3 {
    margin: 0 0 9px;
    color: var(--article-heading-color);
    font-size: 15px;
}

.ram-mini-example__flow {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.ram-mini-example__flow span {
    padding: 7px 10px;
    border-radius: 10px;
    background: #fff;
    color: #314873;
    font-weight: 700;
}

.ram-mini-example__flow b {
    color: #4f82ff;
}

.ram-small-note {
    margin-top: 8px !important;
    color: #7382a0;
    font-size: 12px;
}

/* 内存不够 */

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

.ram-space article {
    min-width: 0;
    padding: 16px;
    border-radius: 15px;
    text-align: center;
}

.ram-space__enough {
    background: #effaf2;
}

.ram-space__full {
    background: #fff5e8;
}

.ram-space article > span {
    display: inline-flex;
    width: 70px;
    height: 70px;
    align-items: center;
    justify-content: center;
    margin-bottom: 7px;
    border-radius: 20px;
    background: #fff;
    font-size: 30px;
}

.ram-space__enough > span {
    color: #2a9c55;
}

.ram-space__full > span {
    color: #d99400;
}

.ram-story .ram-space h3 {
    margin: 0 0 5px;
    color: var(--article-heading-color);
    font-size: 15px;
}

.ram-space p {
    margin: 0;
    color: #617296;
    font-size: 12px;
}

.ram-warning {
    border: 1px solid #ffd0dc;
    background: #fff2f6;
}

.ram-story .ram-warning h3 {
    color: #d83265;
}

/* 断电 */

.ram-power {
    display: grid;
    grid-template-columns: 1fr 52px 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}

.ram-power__on,
.ram-power__off {
    display: flex;
    min-height: 175px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 16px;
    text-align: center;
}

.ram-power__on {
    background: #eef9f0;
}

.ram-power__off {
    background: #f4f1ff;
}

.ram-power__on > span,
.ram-power__off > span {
    display: inline-flex;
    width: 70px;
    height: 70px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #fff;
    font-size: 30px;
}

.ram-power__on > span {
    color: #2a9c55;
}

.ram-power__off > span {
    color: #7654d6;
}

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

.ram-power p {
    margin: 0;
    color: #617296;
    font-size: 12px;
}

.ram-power__arrow {
    color: #4f82ff;
    font-size: 30px;
    font-weight: 900;
    text-align: center;
}

.ram-save {
    background: #fff8e6;
}

.ram-story .ram-save h3 {
    color: #9a6800;
}

/* 总结 */

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

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

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

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

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

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

/* 翻页 */

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

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

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

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

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

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

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

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

/* 平板 */

@media (max-width: 900px) {
    .ram-load-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ram-load-flow > .ram-load-flow__arrow {
        display: none;
    }
}

/* 手机 */

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

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

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

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

    .ram-desk,
    .ram-cpu,
    .ram-power {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .ram-desk__arrow,
    .ram-power__arrow {
        transform: rotate(90deg);
        line-height: 1;
    }

    .ram-desk__storage,
    .ram-desk__memory,
    .ram-cpu__memory,
    .ram-cpu__processor,
    .ram-power__on,
    .ram-power__off {
        min-height: auto;
        padding: 13px;
    }

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

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

    .ram-load-flow {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
    }

    .ram-load-flow > .ram-load-flow__arrow {
        display: block;
        transform: rotate(90deg);
        line-height: 1;
    }

    .ram-load-flow article {
        min-height: auto;
    }

    .ram-load-flow article > img,
    .ram-load-flow__icon {
        width: 58px;
        height: 58px;
    }

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

    .ram-cpu__exchange strong {
        transform: rotate(90deg);
        line-height: 1;
    }

    .ram-mini-example__flow {
        justify-content: flex-start;
    }

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

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

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

    .ram-pagination {
        gap: 9px;
    }

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

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

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

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