/* Bukids flat UI layer (2.0.159) -----------------------------------------------
   Loaded after every other stylesheet. Flat means: no drop shadows, no lift or
   zoom on hover, no decorative gradients. Surfaces are separated by a 1px line
   or a light fill; interaction is shown by colour and border only.
   Layout, links, scripts and data are unchanged.
   Roll back: remove the bukids-polish enqueue in functions.php. */

:root {
    --bk-ui-brand: var(--b2color, #fd4c4c);
    --bk-ui-brand-dark: #e8403f;
    --bk-ui-brand-soft: #fff1f1;
    --bk-ui-ink: #1d2433;
    --bk-ui-text: #475467;
    --bk-ui-muted: #667085;
    --bk-ui-faint: #98a2b3;
    --bk-ui-line: #e6e9ef;
    --bk-ui-line-strong: #d0d5dd;
    --bk-ui-surface: #fff;
    --bk-ui-subtle: #f5f6f8;
    --bk-ui-r-sm: 6px;   /* controls, buttons, chips */
    --bk-ui-r-md: 8px;   /* cards */
    --bk-ui-r-lg: 10px;  /* panels */
    --bk-ui-focus: #475467;
}

.bukids-library,
.bukids-series-page,
.bukids-series-layout,
.bk2-category {
    --bk-radius: var(--bk-ui-r-md);
    --bk-line: var(--bk-ui-line);
    --bk-ink: var(--bk-ui-ink);
    --bk-muted: var(--bk-ui-muted);
    --bk-primary: var(--bk-ui-brand);
    --bk-primary-dark: var(--bk-ui-brand-dark);
    --bk-primary-soft: var(--bk-ui-brand-soft);
}

/* ---------------------------------------------------------------------------
   B2 shell: header, boxes, widgets, mobile bar, modals.
   --------------------------------------------------------------------------- */
body .site .site-header-in,
body .site-header-in {
    box-shadow: none;
    border-bottom: 1px solid var(--bk-ui-line);
}
body .box,
body .single-article.b2-radius,
body .widget,
body .b2-widget-box,
body .modal-content .box,
body .jubao-type > div,
body .pay-my-money > span.b2-radius,
body .elementor-button,
body #content .post-list .item-in { box-shadow: none; }
/* Dropdowns keep a clear edge with a 1px line instead of a blur. */
body .header .top-style.animateIn,
body .header .top-style.animateOut { box-shadow: none; border-bottom: 1px solid var(--bk-ui-line); }
body .ym-menu .sub-menu,
body .has_children .sub-menu,
body .b2-menu-3 .sub-menu-0 li:hover ul,
body .top-menu-ul .box,
body .top-user-box-drop {
    box-shadow: none;
    border: 1px solid var(--bk-ui-line);
}
body .top-submit .button,
body .social-top .top-submit button,
body .tags-page ul li a:hover,
body .link-in:hover { box-shadow: none; }
body #mobile-footer-menu.mobile-footer-menu {
    box-shadow: none;
    border-top: 1px solid var(--bk-ui-line);
}

/* Mobile menu icon: B2 plays its closing animation on every page load, so the
   icon flashes "✕" before settling on "≡". Animate only real toggles. */
body .menu-icon:not(.active) .line-1,
body .menu-icon:not(.active) .line-2,
body .menu-icon:not(.active) .line-3 { -webkit-animation: none; animation: none; }

/* B2's narrow-screen header menu: hide the permanent Windows scrollbar. */
body .ym-menu ul { overflow-x: auto; scrollbar-width: none; }
body .ym-menu ul::-webkit-scrollbar { display: none; }

/* Header search. */
body .site-header .top-search .mobile-search-input[role="search"] {
    border-radius: var(--bk-ui-r-sm);
    transition: border-color .15s ease;
}
@media (hover: hover) and (pointer: fine) {
    body .site-header .top-search .mobile-search-input[role="search"]:hover { border-color: var(--bk-ui-line-strong); }
}

/* Traditional-Chinese switch (plugin): flat chip, kept clear of the phone bar. */
body #StranLink.wencode {
    box-shadow: none;
    border: 1px solid var(--bk-ui-line);
    border-radius: var(--bk-ui-r-sm);
    color: var(--bk-ui-text);
}
@media (max-width: 1180px) {
    body #StranLink.wencode {
        right: 12px;
        bottom: calc(68px + env(safe-area-inset-bottom, 0px));
        padding: 2px 10px;
        font-size: 12px;
        line-height: 22px;
        opacity: .92;
    }
}

/* Player paywall buttons and the poster button: solid fills, no gradients. */
body .video-view-button .button,
body .video-view-button button {
    background-image: none;
    background-color: #f3d27a;
    box-shadow: none;
}
body .content-footer-poster .poster-span {
    background-image: none;
    background-color: #8fb0f7;
    box-shadow: none;
}

/* ---------------------------------------------------------------------------
   Cards: topic cards, B2 resource cards, related topics.
   --------------------------------------------------------------------------- */
body .bukids-card,
body .entry-content .bk-related-topics .bukids-card,
body .bk2-category .post-list .post-list-item > .item-in,
body .bukids-series-native-resources .post-list .post-list-item > .item-in {
    border: 1px solid var(--bk-ui-line);
    border-radius: var(--bk-ui-r-md);
    box-shadow: none;
    transform: none;
    overflow: hidden;
    transition: border-color .15s ease;
}
body .bk2-category .post-list .post-module-thumb,
body .bukids-series-native-resources .post-list .post-module-thumb {
    border-radius: calc(var(--bk-ui-r-md) - 1px) calc(var(--bk-ui-r-md) - 1px) 0 0;
}
body .bukids-card-media { background: var(--bk-ui-subtle); }
body .bukids-card-media img { transform: none; transition: none; }
body .bukids-card-content h3,
body .entry-content .bk-related-topics .bukids-card-content h3 {
    color: var(--bk-ui-ink);
    font-weight: 500;
    transition: color .15s ease;
}
body .bukids-card-cn,
body .entry-content .bk-related-topics .bukids-card-cn { color: var(--bk-ui-muted); }
body .bukids-card-stats,
body .entry-content .bk-related-topics .bukids-card-stats { color: var(--bk-ui-faint); }
body .bukids-card-placeholder { color: #b4bcc8; }
body .bukids-card-link:focus-visible,
body .entry-content .bk-related-topics .bukids-card-link:focus-visible {
    outline: 2px solid var(--bk-ui-focus);
    outline-offset: -2px;
    border-radius: var(--bk-ui-r-md);
}
@media (hover: hover) and (pointer: fine) {
    body .bukids-card:hover,
    body .entry-content .bk-related-topics .bukids-card:hover,
    body .bk2-category .post-list .post-list-item:hover > .item-in,
    body .bukids-series-native-resources .post-list .post-list-item:hover > .item-in {
        border-color: var(--bk-ui-line-strong);
        box-shadow: none;
        transform: none;
        background: var(--bk-ui-surface);
    }
    body .entry-content .bk-related-topics .bukids-card-link:hover { background: var(--bk-ui-surface); }
    body .bukids-card:hover .bukids-card-content h3,
    body .bk-related-topics .bukids-card:hover .bukids-card-content h3 { color: var(--bk-ui-brand); }
    body .bukids-card:hover .bukids-card-media img { transform: none; }
}

/* ---------------------------------------------------------------------------
   Panels and controls.
   --------------------------------------------------------------------------- */
body .bukids-library .bukids-library-form,
body .bukids-series-layout .bukids-series-controls,
body .bukids-series-layout .bukids-series-hero,
body .bk2-category .bukids-series-page > form.bk2-search {
    border-color: var(--bk-ui-line);
    border-radius: var(--bk-ui-r-lg);
    box-shadow: none;
}
body .bukids-series-layout .bukids-series-cover { border-radius: var(--bk-ui-r-md); }

body .bukids-library input,
body .bukids-library select,
body .bukids-library button,
body .bukids-library .bukids-search-field,
body .bukids-library .bukids-sort-field,
body .bukids-series-controls input,
body .bukids-series-controls select,
body .bukids-series-controls button,
body .bk2-category .bk2-search input,
body .bk2-category .bk2-search select,
body .bk2-category .bk2-search-row button,
body .bk2-category .bk2-reset,
body .bukids-series-layout .bukids-series-actions > a,
body .bukids-series-layout .bukids-series-actions > button {
    border-radius: var(--bk-ui-r-sm);
    box-shadow: none;
}
body .bukids-library .bukids-search-field input,
body .bukids-library .bukids-sort-field select { border-radius: 0; }
body .bukids-library select,
body .bukids-series-controls select,
body .bukids-series-controls input,
body .bk2-category .bk2-search select,
body .bk2-category .bk2-search input {
    border-color: var(--bk-ui-line-strong);
    transition: border-color .15s ease;
}
@media (hover: hover) and (pointer: fine) {
    body .bukids-library select:hover,
    body .bukids-series-controls select:hover,
    body .bukids-series-controls input:hover,
    body .bk2-category .bk2-search select:hover,
    body .bk2-category .bk2-search input:hover,
    body .bukids-library .bukids-search-field:hover,
    body .bukids-library .bukids-sort-field:hover { border-color: var(--bk-ui-faint); }
}
body .bukids-library select:focus-visible,
body .bukids-series-controls select:focus-visible,
body .bukids-series-controls input:focus-visible,
body .bk2-category .bk2-search select:focus-visible,
body .bk2-category .bk2-search input:focus-visible {
    border-color: var(--bk-ui-focus);
    outline: 2px solid var(--bk-ui-focus);
    outline-offset: 1px;
}
body .bukids-primary-button,
body .bukids-library .bukids-search-row > button,
body .bukids-series-controls button[type="submit"],
body .bk2-category .bk2-search-row button {
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease;
}

/* Disclosure rows ("筛选条件", "筛选与排序"): one chevron style everywhere. */
body .bukids-library .bukids-filter-details > summary,
body .bk2-mobile-filters > summary { list-style: none; }
body .bukids-library .bukids-filter-details > summary::-webkit-details-marker,
body .bk2-mobile-filters > summary::-webkit-details-marker { display: none; }
body .bukids-library .bukids-filter-details > summary::after,
body .bk2-mobile-filters > summary::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform .2s ease;
    vertical-align: middle;
}
body .bukids-library .bukids-filter-details[open] > summary::after,
body .bk2-mobile-filters[open] > summary::after { transform: translateY(1px) rotate(-135deg); }

/* Alphabet index: a single framed strip; scroll buttons sit inside it. */
body .bukids-alphabet {
    border-color: var(--bk-ui-line);
    border-radius: var(--bk-ui-r-lg);
    box-shadow: none;
}
body .bukids-alphabet a { border-radius: var(--bk-ui-r-sm); transition: background-color .15s ease, color .15s ease; }
body .bukids-alphabet a.is-active,
body .bukids-alphabet a[aria-current="page"] { box-shadow: none; }
body .bk2-alphabet-wrap {
    gap: 0;
    overflow: hidden;
    background: var(--bk-ui-surface);
    border: 1px solid var(--bk-ui-line);
    border-radius: var(--bk-ui-r-lg);
    box-shadow: none;
}
body .bk2-alphabet-wrap .bukids-alphabet { border: 0; border-radius: 0; }
body .bk2-alphabet-wrap > button {
    flex-basis: 36px;
    border: 0;
    border-radius: 0;
    background: var(--bk-ui-surface);
    color: var(--bk-ui-text);
    box-shadow: none;
}
body .bk2-alphabet-wrap > button:first-child { border-right: 1px solid var(--bk-ui-line); }
body .bk2-alphabet-wrap > button:last-child { border-left: 1px solid var(--bk-ui-line); }
@media (hover: hover) and (pointer: fine) {
    body .bk2-alphabet-wrap > button:not(:disabled):hover { background: var(--bk-ui-subtle); color: var(--bk-ui-ink); }
}
@media (max-width: 768px) { body .bk2-alphabet-wrap > button { flex-basis: 44px; } }

body .bk2-tabs a[aria-current] { color: var(--bk-ui-ink); }

/* Related topics heading on resource articles. */
body .entry-content .bk-related-topics > h2 { color: var(--bk-ui-ink); font-weight: 600; }

/* Membership page styles live in assets/css/membership.css (2.0.163). */

@media (prefers-reduced-motion: reduce) {
    body .bukids-card,
    body .bk2-category .post-list .post-list-item > .item-in,
    body .bukids-series-native-resources .post-list .post-list-item > .item-in { transition: none; }
}
