/* 2.0.186 (from 2.0.185): second-level navigation, desktop row (≥1181px).
   Flat and quiet: white row, text-only items, one sliding 2px underline
   (red on the current section, ink while pointing elsewhere) — the same
   language as the logo row above. Sub-menus open as a full-width strip under
   the row: section title + "查看全部" on the left, links on the right,
   content aligned with the page wrapper. Behaviour lives in nav.js; without
   it B2's own menu remains. Tablet/phone drawer (≤1180px) is untouched. */

body .top-menu-ul > li.bk-nav-group,
body .top-menu-ul > .bk-nav-pill,
body .top-menu-ul .sub-menu > li.bk-mega-head { display: none; }

/* 2.0.186: drawer menu (≤1180px), same flat language as the desktop row:
   white sheet, hairlines instead of grey boxes, "英文 / 中文" section labels,
   sub-items lighter than their section (B2 had them bolder), 2 columns for
   the long channel lists. On tablets the drawer is a 400px side sheet
   instead of a full-width page. */
@media (max-width: 1180px) {
    body .site-header .mobile-box { background: #fff; }
    body .site-header .mobile-box .header-logo { border-bottom: 1px solid #eef0f4; }
    body .site-header .top-menu .top-menu-ul { padding: 0 0 40px; }
    body .top-menu-ul.bk-nav-grouped > li.bk-nav-group {
        display: block;
        padding: 20px 4px 6px;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: .08em;
        color: #8a93a3;
    }
    body .top-menu-ul.bk-nav-grouped > li.bk-nav-group:first-of-type { padding-top: 6px; }
    body .top-menu-ul.bk-nav-grouped .bk-nav-pre { display: none; }
    body .site-header .top-menu ul li.depth-0 {
        margin: 0;
        border: 0;
        border-bottom: 1px solid #f0f2f5;
        border-radius: 0;
    }
    body .site-header .top-menu ul li.depth-0 > a,
    body .site-header .top-menu-ul > li.depth-0:first-child > a {
        padding: 14px 4px !important;
        background: none;
        font-size: 16px;
        font-weight: 500;
        color: #1d2433 !important;
    }
    body .site-header .top-menu ul li.depth-0.bk-nav-current > a,
    body .site-header .top-menu ul li.depth-0.current-menu-item > a { color: var(--bk-ui-brand, #fd4c4c) !important; }
    body .site-header .top-menu-ul > li.depth-0 > a i.b2-arrow-down-s-line {
        top: 50%;
        right: 0;
        margin-top: -22px;
        padding: 12px;
        background: none;
        color: #98a2b3;
        font-size: 18px;
        line-height: 20px;
        transition: transform .22s cubic-bezier(.22, 1, .36, 1);
    }
    body .site-header .top-menu-ul > li.depth-0.show > a i.b2-arrow-down-s-line { transform: rotate(180deg); }
    body .site-header .top-menu ul li.depth-0.show .sub-menu,
    body .site-header .top-menu ul li.depth-0.b2-menu-4.show .sub-menu { margin: 0; padding: 0 0 10px; }
    body .site-header .top-menu ul li.depth-0 .sub-menu > li { margin: 0; width: auto; }
    body .site-header .top-menu ul li.depth-0 .sub-menu > li > a {
        display: block;
        margin: 0;
        padding: 10px 4px 10px 16px;
        border: 0;
        background: none;
        font-size: 15px;
        font-weight: 400;
        line-height: 1.4;
        color: #5b6474;
    }
    body .site-header .top-menu ul li.depth-0 .sub-menu > li.current-menu-item > a,
    body .site-header .top-menu ul li.depth-0 .sub-menu > li.bk-sub-current > a { color: var(--bk-ui-brand, #fd4c4c); font-weight: 500; }
    body .site-header .top-menu ul li.depth-0.b2-menu-4.show .sub-menu-0 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 8px;
    }
}
@media (min-width: 601px) and (max-width: 1180px) {
    body .site-header .mobile-box { width: 400px; }
    body .site-header .mobile-box.show-menu-box { transform: none; }
    body .site-header.social-top .mobile-box .header-logo,
    body .social-top .mobile-box .header-logo { margin-left: 0; }
    body .site-header .top-menu { margin-left: 0; padding: 12px 20px; }
}

@media (min-width: 1181px) {
    body .site-header .top-style-bottom {
        position: relative;
        background: #fff;
        border-top: 1px solid #f0f2f5;
        border-bottom: 1px solid #e9ecf1;
    }
    body .site-header .top-style-bottom .top-style-blur { display: none; }

    body .top-menu .top-menu-ul.bk-nav {
        position: relative;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        height: 55px;
    }

    /* Language groups: "英文 | 中文" said once */
    body .top-menu-ul.bk-nav > li.bk-nav-group {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        padding: 0 6px 0 0;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: .08em;
        color: #8a93a3;
        user-select: none;
    }
    body .top-menu-ul.bk-nav > li.bk-nav-group.is-second {
        position: relative;
        margin-left: 18px;
        padding-left: 28px;
    }
    body .top-menu-ul.bk-nav > li.bk-nav-group.is-second::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        width: 1px;
        height: 14px;
        margin-top: -7px;
        background: #e3e7ed;
    }
    body .top-menu-ul.bk-nav .bk-nav-pre {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    /* Items */
    body .top-menu-ul.bk-nav > li.depth-0 { position: static; align-items: center; }
    body .top-menu-ul.bk-nav > li.depth-0 > a,
    body .social-top .top-menu-ul.bk-nav > li.depth-0 > a {
        height: 55px;
        line-height: 55px;
        padding: 0 14px;
        opacity: 1;
        font-size: 14px;
        font-weight: 500;
        letter-spacing: .01em;
        color: #5b6474;
        transition: color .18s ease-out;
        touch-action: manipulation;
    }
    body .top-menu-ul.bk-nav > li.depth-0:first-child > a,
    body .top-menu-ul.bk-nav > li.bk-nav-group + li.depth-0 > a { padding-left: 14px; }
    body .top-menu-ul.bk-nav > li.depth-0 > a .hob,
    body .top-menu-ul.bk-nav > li.depth-0 > a > i.b2font { display: none; }
    body .top-menu-ul.bk-nav > li.depth-0:hover > a,
    body .top-menu-ul.bk-nav > li.depth-0.bk-open > a { color: #111827; }
    body .top-menu-ul.bk-nav > li.depth-0.bk-nav-current > a,
    body .top-menu-ul.bk-nav > li.depth-0.current-menu-item > a {
        color: #111827;
        font-weight: 600;
    }
    body .top-menu-ul.bk-nav > li.depth-0 > a:focus-visible {
        outline: 2px solid var(--bk-ui-brand, #fd4c4c);
        outline-offset: -8px;
        border-radius: 8px;
    }

    /* Sliding underline, sitting on the row's bottom line */
    body .top-menu-ul.bk-nav > .bk-nav-pill {
        display: block;
        position: absolute;
        left: 0;
        bottom: -1px;
        z-index: 3;
        height: 2px;
        border-radius: 2px;
        background: #111827;
        clip-path: inset(0 14px);
        pointer-events: none;
        opacity: 0;
        transition: transform .32s cubic-bezier(.22, 1, .36, 1), width .32s cubic-bezier(.22, 1, .36, 1), background-color .2s ease-out, opacity .18s ease-out;
    }
    body .top-menu-ul.bk-nav > .bk-nav-pill.is-on { opacity: 1; }
    body .top-menu-ul.bk-nav > .bk-nav-pill.is-current { background: var(--bk-ui-brand, #fd4c4c); }
    body .top-menu-ul.bk-nav > .bk-nav-pill.no-anim { transition: opacity .18s ease-out; }

    /* Full-width strip panel. --bk-ul-x / --bk-vw / --bk-pad-* come from nav.js. */
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu {
        position: absolute;
        top: 100%;
        left: calc(-1 * var(--bk-ul-x, 0px));
        right: auto;
        z-index: 60;
        display: grid;
        grid-template-columns: 200px repeat(auto-fill, minmax(168px, 1fr));
        column-gap: 8px;
        row-gap: 2px;
        align-content: start;
        box-sizing: border-box;
        width: var(--bk-vw, 100vw);
        min-width: 0;
        margin: 1px 0 0;
        padding: 20px var(--bk-pad-r, 24px) 22px var(--bk-pad-l, 24px);
        background: #fff;
        backdrop-filter: none;
        border: 0;
        border-bottom: 1px solid #e9ecf1;
        border-radius: 0;
        box-shadow: none;
        opacity: 0;
        visibility: hidden;
        transform: none;
        clip-path: inset(0 0 100% 0);
        transition: clip-path .22s cubic-bezier(.22, 1, .36, 1), opacity .18s ease-out, visibility 0s linear .22s;
    }
    /* B2 opens on :hover; nav.js decides instead (with a short intent delay). */
    body .top-menu-ul.bk-nav > li.depth-0:hover > .sub-menu { opacity: 0; visibility: hidden; transform: none; }
    body .top-menu-ul.bk-nav > li.depth-0.bk-open > .sub-menu {
        opacity: 1;
        visibility: visible;
        clip-path: inset(0 0 0 0);
        transition: clip-path .3s cubic-bezier(.22, 1, .36, 1), opacity .12s ease-out, visibility 0s;
    }
    /* Moving between items while a panel is open: swap without replaying. */
    body .top-menu-ul.bk-nav.bk-swap > li.depth-0 > .sub-menu { transition: none; }

    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li { margin: 0; width: auto; min-width: 0; padding: 0; }
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li > a {
        display: flex;
        align-items: center;
        min-height: 36px;
        margin-left: -10px;
        padding: 7px 10px;
        box-sizing: border-box;
        border: 0;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.35;
        color: #3d4554;
        white-space: normal;
        transition: background-color .14s ease-out, color .14s ease-out;
    }
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li:not(.bk-mega-head) > a:hover,
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li:not(.bk-mega-head) > a:focus-visible {
        background: #f5f6f8;
        color: #111827;
        outline: none;
    }
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li.current-menu-item > a,
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li.bk-sub-current > a {
        color: var(--bk-ui-brand, #fd4c4c);
        font-weight: 600;
    }

    /* Panel head: section title + "查看全部" */
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li.bk-mega-head {
        grid-column: 1;
        grid-row: 1 / span 20;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-right: 16px;
        padding: 6px 24px 0 0;
        border-right: 1px solid #eef0f4;
    }
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li.bk-mega-head strong {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
        letter-spacing: .01em;
        color: #111827;
    }
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li.bk-mega-head > a {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        min-height: 0;
        margin: 0;
        padding: 0;
        font-size: 13px;
        font-weight: 400;
        color: #8a93a3;
        background: none;
        transition: color .16s ease-out;
    }
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li.bk-mega-head > a > i {
        font-size: 14px;
        transition: transform .2s cubic-bezier(.22, 1, .36, 1);
    }
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li.bk-mega-head > a:hover {
        background: none;
        color: #111827;
        text-decoration: none;
    }
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li.bk-mega-head > a:hover > i { transform: translateX(2px); }
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu > li.bk-mega-head > a:focus-visible {
        outline: 2px solid var(--bk-ui-brand, #fd4c4c);
        outline-offset: 3px;
        border-radius: 4px;
    }
}

@media (min-width: 1181px) and (prefers-reduced-motion: reduce) {
    body .top-menu-ul.bk-nav > .bk-nav-pill,
    body .top-menu-ul.bk-nav > li.depth-0 > .sub-menu,
    body .top-menu-ul.bk-nav > li.depth-0.bk-open > .sub-menu { transition: none; }
}
