/* 一个 0 或 1 有多大？认识 Bit */

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

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

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

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

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

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

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

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

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

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

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

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

/* 一个 Bit */

.bit-one {
    display: grid;
    grid-template-columns: 1.1fr 45px 1.4fr;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.bit-one__label {
    display: flex;
    min-height: 175px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 15px;
    background: #eef5ff;
    text-align: center;
}

.bit-one__label > span {
    color: #0752ff;
    font-size: 58px;
}

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

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

.bit-one__states {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 9px;
}

.bit-one__states > div {
    display: flex;
    min-height: 150px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 15px;
}

.bit-one__zero { background: #f3efff; }
.bit-one__one { background: #eef9f0; }

.bit-one__states strong {
    font-size: 50px;
}

.bit-one__zero strong { color: #7654d6; }
.bit-one__one strong { color: #2a9b55; }

.bit-one__states span {
    margin-top: 4px;
    color: #617296;
    font-size: 10px;
}

.bit-one__arrow {
    color: #4f82ff;
    font-size: 26px;
    font-weight: 900;
    text-align: center;
}

/* 两种可能 */

.bit-choice {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.bit-choice article {
    min-width: 0;
    min-height: 170px;
    padding: 15px;
    border: 1px solid #e1ebff;
    border-radius: 15px;
    background: #f9fbff;
    text-align: center;
}

.bit-choice__value {
    display: inline-flex;
    width: 70px;
    height: 70px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3efff;
    color: #7654d6;
    font-size: 35px;
    font-weight: 900;
}

.bit-choice__value--one {
    background: #eef9f0;
    color: #2a9b55;
}

.bit-choice__or {
    color: #7485a3;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
}

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

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

/* 物理大小 */

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

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

.bit-size__wrong { background: #fff2f5; }
.bit-size__right { background: #eef9f0; }

.bit-size > div > span {
    font-size: 54px;
}

.bit-size__wrong > span { color: #df4d74; }
.bit-size__right > span { color: #2a9b55; }

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

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

/* 硬件实现 */

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

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

.bit-hardware article > span,
.bit-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;
}

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

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

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

/* 组合数量 */

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

.bit-combinations__card {
    min-width: 0;
    padding: 15px;
    border-radius: 15px;
    background: #f7f8fc;
    text-align: center;
}

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

.bit-combinations__bits {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.bit-combinations__bits--four {
    grid-template-columns: repeat(2,1fr);
}

.bit-combinations__bits code,
.bit-combinations__mini span {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    color: #1d3d75;
    font-weight: 800;
}

.bit-combinations__mini {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.bit-combinations__mini span {
    min-height: 36px;
    font-size: 10px;
}

.bit-combinations__card > strong {
    color: #0752ff;
    font-size: 13px;
}

.bit-formula,
.bit-case {
    display: flex;
    gap: 11px;
    align-items: center;
    margin-top: 12px;
    padding: 13px 15px;
    border-radius: 14px;
}

.bit-formula { background: #eef5ff; }
.bit-case { background: #f3efff; }

.bit-formula > span,
.bit-case > span {
    font-size: 28px;
}

.bit-formula > span { color: #0752ff; }
.bit-case > span { color: #7654d6; }

.bit-formula p,
.bit-case p { margin: 0; }

.bit-key--power { background: #eaf5ff; }

/* bit vs Byte */

.bit-vs-byte {
    display: grid;
    grid-template-columns: 1fr 65px 1fr;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.bit-vs-byte__bit,
.bit-vs-byte__byte {
    display: flex;
    min-height: 185px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 14px;
    border-radius: 15px;
    text-align: center;
}

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

.bit-vs-byte__symbol {
    display: inline-flex;
    width: 68px;
    height: 68px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #fff;
    color: #0752ff;
    font-size: 34px;
    font-weight: 900;
}

.bit-vs-byte__byte .bit-vs-byte__symbol { color: #2a9b55; }

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

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

.bit-vs-byte strong {
    font-size: 12px;
}

.bit-vs-byte__arrow {
    color: #7485a3;
    font-size: 34px;
    font-weight: 900;
    text-align: center;
}

.bit-note--byte { background: #fff8e5; }

/* 总结 */

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

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

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

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

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

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

/* 翻页 */

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

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

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

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

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

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

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

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

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

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

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

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

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

    .bit-one,
    .bit-choice,
    .bit-vs-byte {
        grid-template-columns: minmax(0,1fr);
        gap: 7px;
    }

    .bit-one__arrow {
        transform: rotate(90deg);
        line-height: 1;
    }

    .bit-choice__or,
    .bit-vs-byte__arrow {
        line-height: 1;
    }

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

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

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

    .bit-hardware,
    .bit-life {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px;
    }

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

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

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

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

    .bit-pagination { gap: 9px; }

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

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

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

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