/* ==========================================================================
   站内内容与广告（图书馆教程 / 首页公告轮播 / 广告位）
   --------------------------------------------------------------------------
   只在需要的页面通过 extraCss 引入，避免首页之外多下载一份无用样式：
     /library、/library/{id}          图书馆列表与教程详情
     首页（home.php 已有 home.css）   公告轮播样式在这里，layout_home 页面都加载
     广告位                           所有投放页面共用 .bh-ad 系列
   ========================================================================== */

/* ---------------------------------------------------------------- 图书馆 */
.bh-lib {
    padding-bottom: 48px;
}

.bh-lib__filter {
    padding: 18px 0 6px;
    background: #fff;
}

/* 左：两行筛选；右：搜索框，与左侧两行等高 */
.bh-lib__filterinner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 28px;
    align-items: stretch;
}

.bh-lib__rows {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bh-lib__search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    min-height: 84px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--bh-border);
    border-radius: 12px;
    background: var(--bh-bg-input);
    transition: var(--bh-transition);
}

.bh-lib__search:focus-within {
    border-color: var(--bh-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 84, 83, .1);
}

.bh-lib__search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0 6px;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--bh-text);
    outline: none;
}

.bh-lib__search button {
    flex: none;
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 9px;
    background: var(--bh-primary);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: var(--bh-transition);
}

.bh-lib__search button:hover {
    background: var(--bh-primary-hover);
}

.bh-lib__row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
}

.bh-lib__label {
    flex: none;
    width: 56px;
    padding-top: 7px;
    font-size: 12.5px;
    color: var(--bh-text-muted);
}

.bh-lib__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bh-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 13px;
    border: 1px solid var(--bh-border);
    border-radius: var(--bh-radius-pill);
    background: #fff;
    color: var(--bh-text-sub);
    font-size: 12.5px;
    text-decoration: none;
    transition: var(--bh-transition);
}

.bh-chip:hover {
    border-color: #f3c3c2;
    color: var(--bh-primary);
    background: var(--bh-primary-light);
}

.bh-chip.is-active {
    border-color: var(--bh-primary);
    background: var(--bh-primary-light);
    color: var(--bh-primary);
    font-weight: 600;
}

.bh-chip i {
    font-style: normal;
    font-size: 11px;
    color: var(--bh-text-placeholder);
}

.bh-chip.is-active i {
    color: var(--bh-primary);
}

.bh-lib__tip {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--bh-text-muted);
}

.bh-lib__tip a {
    margin-left: 8px;
    color: var(--bh-primary);
    text-decoration: none;
}

.bh-lib__body {
    padding-top: 20px;
}

.bh-lib__group + .bh-lib__group {
    margin-top: 34px;
}

.bh-lib__grouphead {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.bh-lib__kindicon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--bh-primary-light);
    color: var(--bh-primary);
}

.bh-lib__kindbody {
    min-width: 0;
    flex: 1 1 auto;
}

.bh-lib__kindtitle {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--bh-text);
}

.bh-lib__kindtitle small {
    font-size: 12px;
    font-weight: 400;
    color: var(--bh-text-muted);
}

.bh-lib__kinddesc {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--bh-text-muted);
}

.bh-lib__cta {
    flex: none;
    font-size: 12.5px;
    color: var(--bh-text-sub);
    text-decoration: none;
    transition: var(--bh-transition);
}

.bh-lib__cta:hover {
    color: var(--bh-primary);
}

.bh-lib__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
    gap: 14px;
}

/* ---- 教程卡 ---- */
.bh-tut {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px 14px;
    border: 1px solid var(--bh-border-light);
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.bh-tut:hover {
    border-color: #f3c3c2;
    box-shadow: var(--bh-shadow);
    transform: translateY(-2px);
}

.bh-tut__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bh-tut__level {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 600;
    background: #f3f4f6;
    color: var(--bh-text-sub);
}

.bh-tut__level--intro { background: #eefaf1; color: #2b8a4b; }
.bh-tut__level--basic { background: #eef4fe; color: #2f6fd0; }
.bh-tut__level--mid   { background: #fff6e6; color: #a86a12; }
.bh-tut__level--pro   { background: #fdeeee; color: #b3352f; }

.bh-tut__views {
    font-size: 11.5px;
    color: var(--bh-text-placeholder);
}

.bh-tut__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--bh-text);
    letter-spacing: -.01em;
}

.bh-tut__desc {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--bh-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bh-tut__more {
    margin-top: 4px;
    font-size: 12px;
    color: var(--bh-primary);
}

.bh-tut__more span {
    margin-left: 3px;
}

/* ---------------------------------------------------------------- 教程详情 */
.bh-doc__wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 26px;
    align-items: start;
    padding-top: 20px;
}

.bh-crumb--doc {
    padding-top: 18px;
}

.bh-doc {
    padding: 30px 36px 26px;
    border: 1px solid var(--bh-border-light);
    border-radius: 14px;
    background: #fff;
}

.bh-doc__tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.bh-doc__kind {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--bh-primary-light);
    color: var(--bh-primary);
    font-size: 12px;
    text-decoration: none;
}

.bh-doc__kind svg {
    width: 14px;
    height: 14px;
}

.bh-doc__level {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
}

.bh-doc__title {
    margin: 0 0 10px;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.02em;
    color: var(--bh-text);
}

.bh-doc__summary {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--bh-text-sub);
}

.bh-doc__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--bh-border-light);
    font-size: 12px;
    color: var(--bh-text-placeholder);
}

.bh-doc__meta a {
    color: var(--bh-primary);
    text-decoration: none;
}

/* ---- 正文排版 ---- */
.bh-doc__body {
    padding-top: 8px;
    font-size: 15px;
    line-height: 1.95;
    color: #33353a;
}

.bh-doc__body h2 {
    position: relative;
    margin: 30px 0 12px;
    padding-left: 12px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--bh-text);
}

.bh-doc__body h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 2px;
    background: var(--bh-primary);
}

.bh-doc__body h3 {
    margin: 22px 0 8px;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--bh-text);
}

.bh-doc__body h4 {
    margin: 18px 0 6px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--bh-text-sub);
}

.bh-doc__body p {
    margin: 0 0 .8em;
}

.bh-doc__body ul,
.bh-doc__body ol {
    margin: 0 0 1em;
    padding-left: 1.4em;
}

.bh-doc__body li {
    margin: .28em 0;
}

.bh-doc__body li::marker {
    color: var(--bh-primary);
}

.bh-doc__body blockquote {
    margin: 14px 0;
    padding: 12px 16px;
    border-left: 3px solid #f3c3c2;
    border-radius: 0 8px 8px 0;
    background: #fbfbfc;
    color: var(--bh-text-sub);
    font-size: 14px;
}

.bh-doc__body code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #f5f6f8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: #b3352f;
}

.bh-doc__body strong {
    font-weight: 600;
    color: var(--bh-text);
}

.bh-doc__body hr {
    margin: 26px 0;
    border: 0;
    border-top: 1px dashed var(--bh-border);
}

.bh-doc__body a {
    color: var(--bh-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 84, 83, .3);
}

.bh-doc__body a:hover {
    border-bottom-color: var(--bh-primary);
}

.bh-doc__fig {
    margin: 18px 0;
}

.bh-doc__fig img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--bh-border-light);
    border-radius: 10px;
}

.bh-doc__fig figcaption {
    margin-top: 8px;
    font-size: 12px;
    color: var(--bh-text-placeholder);
    text-align: center;
}

/* ---- 上一篇 / 下一篇 ---- */
.bh-doc__foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--bh-border-light);
}

.bh-doc__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--bh-border-light);
    border-radius: 10px;
    text-decoration: none;
    transition: var(--bh-transition);
}

.bh-doc__nav:hover {
    border-color: #f3c3c2;
    background: #fffafa;
}

.bh-doc__nav small {
    font-size: 11.5px;
    color: var(--bh-text-placeholder);
}

.bh-doc__nav b {
    font-size: 13px;
    font-weight: 500;
    color: var(--bh-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bh-doc__nav--next {
    text-align: right;
    align-items: flex-end;
}

.bh-doc__nav.is-empty {
    border-color: transparent;
}

/* ---- 右侧栏 ---- */
.bh-doc__side {
    position: sticky;
    top: calc(var(--bh-header-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bh-doc__sidecard {
    padding: 16px 18px;
    border: 1px solid var(--bh-border-light);
    border-radius: 12px;
    background: #fff;
}

.bh-doc__sidetitle {
    margin: 0 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--bh-text);
}

.bh-doc__toc {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bh-doc__toc li + li {
    border-top: 1px solid var(--bh-border-light);
}

.bh-doc__toc a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 0;
    text-decoration: none;
    transition: var(--bh-transition);
}

.bh-doc__toc a:hover .bh-doc__toctt {
    color: var(--bh-primary);
}

.bh-doc__toclv {
    flex: none;
    margin-top: 1px;
    padding: 0 5px;
    border-radius: 4px;
    background: #f3f4f6;
    font-size: 11px;
    line-height: 18px;
    color: var(--bh-text-muted);
}

.bh-doc__toctt {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--bh-text-sub);
    transition: var(--bh-transition);
}

.bh-doc__tocall {
    color: var(--bh-primary) !important;
    font-size: 12.5px;
    padding: 10px 0 2px !important;
}

.bh-doc__sidecard--cta b {
    display: block;
    font-size: 13.5px;
    color: var(--bh-text);
}

.bh-doc__sidecard--cta p {
    margin: 6px 0 12px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--bh-text-muted);
}

.bh-doc__sidecard--cta .bh-btn {
    width: 100%;
    justify-content: center;
}

/* ---------------------------------------------------------------- 广告位 */
/* 广告位与上下区块等宽：外层铺满（和相邻 section 同宽），
   内容再收进 1180 容器，视觉上不会比上下两块窄一圈 */
.bh-ad {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 24px 0 0;
    padding: 0;
}

.bh-ad--lib,
.bh-ad--doc {
    margin-top: 26px;
    margin-bottom: 8px;
}

.bh-ad__body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: var(--bh-container);
    max-width: calc(100% - 48px);
    margin: 0 auto;
}

.bh-ad__tag {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 3;
    padding: 0 6px;
    border: 1px solid #f0e3b4;
    border-radius: 4px;
    background: #fff8d9;
    color: #97781c;
    font-size: 11px;
    line-height: 16px;
    letter-spacing: .3px;
    pointer-events: none;
}

.bh-ad__link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bh-bg-section);
    text-decoration: none;
}

.bh-ad__link img {
    display: block;
    width: 100%;
    height: auto;
}

.bh-ad__code {
    overflow: hidden;
    border-radius: 10px;
}

/* ---------------------------------------------------------------- 首页公告轮播 */
.bh-hero--notice {
    /* 分类条 margin-top:-38px 会压住横幅下沿；这里补一段空白，
       让重叠区落在白底上，轮播标题与圆点不被白色渐变洗掉 */
    padding-bottom: 38px;
}

.bh-notice {
    position: relative;
    aspect-ratio: 2400 / 333;
    line-height: 0;
}

.bh-notice__item {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity .55s ease, visibility .55s ease;
    text-decoration: none;
}

.bh-notice__item.is-active {
    opacity: 1;
    visibility: visible;
}

.bh-notice__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* 没有封面时用品牌渐变兜底，标题仍然可读 */
.bh-notice__item--plain {
    background: linear-gradient(120deg, #dff0fb 0%, #fdeef2 45%, #fdf3e8 100%);
}

.bh-notice__cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    /* 文字压在下沿：渐变最深处，保证浅色横幅上也读得清 */
    justify-content: flex-end;
    gap: 4px;
    padding: 30px 24px 18px;
    background: linear-gradient(0deg, rgba(10, 12, 16, .86) 0%, rgba(10, 12, 16, .62) 46%, rgba(10, 12, 16, 0) 100%);
    line-height: 1.4;
    color: #fff;
}

.bh-notice__tag {
    align-self: flex-start;
    padding: 1px 8px;
    border-radius: 4px;
    background: #fff;
    color: var(--bh-primary);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: .4px;
}

.bh-notice__title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bh-notice__desc {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .94);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bh-notice__dots {
    position: absolute;
    right: 18px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.bh-notice__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.bh-notice__dot.is-active {
    width: 18px;
    background: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .bh-notice__item {
        transition: none;
    }
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1024px) {
    .bh-doc__wrap {
        grid-template-columns: minmax(0, 1fr);
    }

    .bh-doc__side {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .bh-doc__sidecard {
        flex: 1 1 300px;
    }
}

@media (max-width: 640px) {
    .bh-lib {
        padding-bottom: 32px;
    }

    .bh-lib__filterinner {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .bh-lib__search {
        min-height: 0;
        height: 48px;
        padding: 4px 8px 4px 10px;
    }

    .bh-lib__search input {
        height: 40px;
    }

    .bh-lib__search button {
        height: 40px;
        padding: 0 16px;
    }

    .bh-lib__row {
        flex-direction: column;
        gap: 6px;
    }

    .bh-lib__label {
        width: auto;
        padding-top: 0;
    }

    .bh-lib__grid {
        grid-template-columns: 1fr;
    }

    .bh-lib__grouphead {
        flex-wrap: wrap;
    }

    .bh-lib__cta {
        order: 3;
    }

    .bh-doc {
        padding: 20px 18px 18px;
        border-radius: 12px;
    }

    .bh-doc__title {
        font-size: 22px;
    }

    .bh-doc__body {
        font-size: 14.5px;
        line-height: 1.9;
    }

    .bh-doc__foot {
        grid-template-columns: 1fr;
    }

    .bh-doc__nav--next {
        text-align: left;
        align-items: flex-start;
    }

    .bh-ad {
        max-width: calc(100% - 32px);
        margin-top: 18px;
    }

    /* 手机端首页原本整块隐藏 hero：公告要能看见，改成紧凑文字条 */
    .bh-hero.bh-hero--notice {
        display: block;
        margin-top: 0;
    }

    .bh-hero--notice .bh-hero__banner {
        max-width: none;
        background: #fff;
    }

    .bh-hero--notice .bh-hero__veil {
        display: none;
    }

    .bh-hero--notice {
        padding-bottom: 0;
    }

    .bh-notice {
        aspect-ratio: auto;
    }

    .bh-notice__item {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
    }

    .bh-notice__item.is-active {
        display: block;
    }

    .bh-notice__img {
        display: none;
    }

    .bh-notice__cap {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        background: #fff7f8;
        color: var(--bh-text);
        border-bottom: 1px solid var(--bh-border-light);
    }

    .bh-notice__tag {
        background: var(--bh-primary-light);
        color: var(--bh-primary);
    }

    .bh-notice__title {
        font-size: 13.5px;
        flex: 1 1 auto;
    }

    .bh-notice__desc {
        display: none;
    }

    .bh-notice__dots {
        position: static;
        justify-content: center;
        padding: 8px 0;
        background: #fff;
    }

    .bh-notice__dot {
        background: #e5e6ea;
    }

    .bh-notice__dot.is-active {
        background: var(--bh-primary);
    }
}

/* 教程里的围栏代码块（贴剧本片段 / 对话片段用） */
.bh-doc__pre {
    margin: 16px 0;
    padding: 14px 16px;
    border: 1px solid var(--bh-border-light);
    border-radius: 10px;
    background: #f8f9fb;
    overflow-x: auto;
}

.bh-doc__pre code {
    display: block;
    padding: 0;
    background: none;
    color: #33353a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "PingFang SC", monospace;
    font-size: 12.5px;
    line-height: 1.85;
    white-space: pre;
}

/* ---------------------------------------------------------------- 二级页两侧竖幅 */
/* 二级页 / 排行榜：内容收成三栏，左右各留一个竖幅广告位。
   广告位与筛选区同高起点、与中间内容保持 22px 间距；
   高度按 120:600 的比例，但不超过视口高度的 70%（1024×768 下约 538px）。 */
.bh-list__cols {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) 104px;
    gap: 22px;
    align-items: start;
}

.bh-list__cols > .bh-list__main {
    min-width: 0;
}

/* 列表内部的 .bh-container 在三栏里不再自己定宽 */
.bh-list__cols .bh-list__main > .bh-container,
.bh-list__cols .bh-list__main .bh-container {
    width: auto;
    max-width: none;
    margin: 0;
}

.bh-ad-rail {
    position: sticky;
    top: calc(var(--bh-header-h) + 20px);
    align-self: start;
    width: 100%;
    margin: 0;
}

.bh-ad-rail__link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bh-bg-section);
}

.bh-ad-rail img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: cover;
}

.bh-ad-rail .bh-ad__tag {
    top: 5px;
    right: 6px;
    padding: 0 5px;
    font-size: 10px;
    line-height: 14px;
}

/* 三栏后内容变窄：1024~1100 之间把两列卡片收成一列，避免卡内文字被挤断 */
@media (max-width: 1100px) {
    .bh-list__cols .bh-grid,
    .bh-list__cols .bh-rankgrid,
    .bh-list__cols .bh-nv-grid {
        grid-template-columns: 1fr;
    }
}

/* 1024 以下放不下两侧竖幅：收成单栏，广告位隐藏 */
@media (max-width: 1023px) {
    .bh-list__cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .bh-list__cols > .bh-ad-rail {
        display: none;
    }
}

/* ---------------------------------------------------------------- 二级页顶部横幅 */
/* 横幅尺寸、导航压图虚化、与内容的 18px 间距已统一到 home.css
   （layout_workbench 不加载本文件，放这里会让创作管理页对不上）。
   这里只保留三栏列表页自己的排布。 */
.bh-list__cols .bh-nv-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

@media (max-width: 1440px) {
    .bh-list__cols .bh-rankgrid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------- 标题区节奏 */
/* .bh-pagehead 的标题/说明间距同样统一在 home.css 的「二级页标题区节奏」里 */

.bh-nv-hero__title {
    margin-bottom: 14px;
}

.bh-nv-hero__desc {
    line-height: 1.7;
}

.bh-ex__sub {
    margin-top: 12px;
    line-height: 1.7;
}

/* 导出下载页：广告位在作品列表上下，宽度跟列表一致 */
.bh-ex .bh-ad {
    margin: 18px 0;
}

.bh-ex .bh-ad__body {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* 图书馆：广告位与上下教程分组等宽（外层已在外层容器内，不再额外收窄） */
.bh-lib .bh-ad {
    margin: 20px 0;
}

.bh-lib .bh-ad__body {
    width: 100%;
    max-width: none;
    margin: 0;
}
