/* ============================================================
   www.gafei.com v3 - Business Insider Japan style
   生成日期: 2026-08-30
   注意: 媒体查询必须保持在文件末尾（层叠顺序）
   ============================================================ */

:root {
    --bi-red: #AA0012;
    --bi-red-dark: #8C000E;
    --bi-black: #111111;
    --bi-gray: #666666;
    --bi-light: #F5F5F3;
    --bi-border: #E5E5E2;
    --bi-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--bi-font);
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fff;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--bi-red); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.bi-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ============ 顶部黑色窄条 ============ */
.bi-topbar {
    background: var(--bi-black);
    color: #ccc;
    font-size: 12px;
}
.bi-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bi-topbar a { color: #ccc; }
.bi-topbar a:hover { color: #fff; }

/* ============ 主 Header ============ */
.bi-header {
    background: #fff;
    border-bottom: 3px solid var(--bi-red);
    position: sticky;
    top: 0;
    z-index: 100;
}
.bi-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 60px;
}
.bi-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--bi-black);
    white-space: nowrap;
}
.bi-logo em { font-style: normal; color: var(--bi-red); }
.bi-logo-sub {
    font-size: 10px;
    color: #999;
    letter-spacing: 1px;
    display: block;
    margin-top: -4px;
}
.bi-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
}
.bi-nav a {
    display: inline-block;
    padding: 8px 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    border-radius: 2px;
}
.bi-nav a:hover { color: var(--bi-red); }
.bi-nav a.on { color: var(--bi-red); }
.bi-header-search {
    flex-shrink: 0;
    position: relative;
}
.bi-header-search input {
    width: 180px;
    height: 34px;
    border: 1px solid var(--bi-border);
    border-radius: 17px;
    padding: 0 38px 0 14px;
    font-size: 13px;
    outline: none;
    background: var(--bi-light);
}
.bi-header-search input:focus { border-color: var(--bi-red); }
.bi-header-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: var(--bi-red);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}

/* ============ Hero 大图搜索区（保留原功能） ============ */
.bi-hero {
    position: relative;
    background: url('https://css.coffeecdn.com/images/banner.png') center center / cover no-repeat, #3a2418;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bi-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}
.bi-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    padding: 56px 16px 48px;
    text-align: center;
}
.bi-hero-title {
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 4px;
    margin-bottom: 26px;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
    word-break: normal;
    overflow-wrap: break-word;
}
.bi-hero-form {
    display: flex;
    max-width: 560px;
    margin: 0 auto 22px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.bi-hero-form input {
    flex: 1;
    min-width: 0;
    height: 50px;
    border: 0;
    padding: 0 18px;
    font-size: 16px;
    outline: none;
}
.bi-hero-form button {
    width: 110px;
    height: 50px;
    border: 0;
    background: var(--bi-red);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 4px;
}
.bi-hero-form button:hover { background: var(--bi-red-dark); }
.bi-hotwords {
    color: rgba(255,255,255,.92);
    font-size: 13px;
    line-height: 2;
}
.bi-hotwords strong { font-weight: 700; margin-right: 6px; }
.bi-hotwords a {
    color: rgba(255,255,255,.92);
    display: inline-block;
    margin: 0 10px 0 0;
    padding: 2px 4px;
}
.bi-hotwords a:hover { color: #fff; text-decoration: underline; }

/* ============ 主体布局 ============ */
.bi-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 16px 10px;
}
.bi-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
}
.bi-layout-main { min-width: 0; }
.bi-layout-side { min-width: 0; }

/* ============ 区块通用 ============ */
.bi-section { margin-bottom: 40px; }
.bi-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid var(--bi-black);
    margin-bottom: 18px;
    padding-bottom: 8px;
}
.bi-section-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--bi-black);
    position: relative;
    padding-left: 14px;
}
.bi-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 5px;
    background: var(--bi-red);
}
.bi-section-more { font-size: 13px; color: var(--bi-gray); }

/* ============ 头条区：1 大 + 3 小 ============ */
.bi-lead {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 24px;
}
.bi-lead-main { min-width: 0; }
.bi-lead-main .bi-card-img { aspect-ratio: 16 / 9; }
.bi-lead-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.bi-lead-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}
.bi-lead-item img { width: 150px; height: 100px; object-fit: cover; border-radius: 2px; }

/* ============ 卡片 ============ */
.bi-card-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    background: var(--bi-light);
    border-radius: 2px;
}
.bi-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--bi-red);
    border: 1px solid var(--bi-red);
    padding: 0 6px;
    border-radius: 2px;
    line-height: 18px;
    margin-bottom: 6px;
}
.bi-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    color: #1a1a1a;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto;
}
a:hover .bi-card-title { color: var(--bi-red); }
.bi-card-desc {
    font-size: 13px;
    color: var(--bi-gray);
    line-height: 1.7;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: normal;
    overflow-wrap: break-word;
}
.bi-meta { font-size: 12px; color: #999; margin-top: 6px; }

/* 头条主卡 */
.bi-lead-main .bi-card-title { font-size: 22px; margin-top: 8px; }

/* ============ 新闻流：大卡 + 小卡网格交替 ============ */
.bi-feed { display: flex; flex-direction: column; gap: 26px; }
.bi-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
}

/* ============ 栏目区块（首篇大图 + 列表） ============ */
.bi-catblock {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
}
.bi-catblock-img { aspect-ratio: 4 / 3; }
.bi-catblock-list { display: flex; flex-direction: column; }
.bi-catblock-list li {
    padding: 9px 0;
    border-bottom: 1px dashed var(--bi-border);
    display: flex;
    gap: 10px;
    align-items: baseline;
}
.bi-catblock-list li:last-child { border-bottom: 0; }
.bi-catblock-list .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--bi-red);
    flex-shrink: 0;
    transform: translateY(-3px);
}
.bi-catblock-list a {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    word-break: normal;
    overflow-wrap: break-word;
}
.bi-catblock-list .dt { font-size: 12px; color: #aaa; flex-shrink: 0; }

/* ============ 侧栏 ============ */
.bi-widget { margin-bottom: 32px; }
.bi-widget-head {
    font-size: 16px;
    font-weight: 800;
    border-bottom: 2px solid var(--bi-black);
    padding-bottom: 8px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.bi-widget-head span:last-child { font-size: 11px; color: #aaa; font-weight: 400; }
.bi-rank li {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0EE;
    align-items: baseline;
}
.bi-rank .num {
    font-size: 20px;
    font-weight: 800;
    font-style: italic;
    color: #D8D8D4;
    flex-shrink: 0;
    width: 28px;
    line-height: 1;
}
.bi-rank li:nth-child(1) .num { color: var(--bi-red); }
.bi-rank li:nth-child(2) .num { color: #E05510; }
.bi-rank li:nth-child(3) .num { color: #E08A10; }
.bi-rank a {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    word-break: normal;
    overflow-wrap: break-word;
}
.bi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
}
.bi-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bi-light);
    border-radius: 2px;
    font-size: 13px;
    color: #444;
}
.bi-tags a:hover { background: var(--bi-red); color: #fff; }

/* ============ 合作伙伴 + 友情链接 ============ */
.bi-links {
    background: var(--bi-light);
    padding: 26px 0;
    margin-top: 10px;
}
.bi-links-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.bi-partner {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}
.bi-partner img { height: 36px; width: auto; }
.bi-links-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--bi-black);
    margin-bottom: 10px;
}
.bi-links-list { line-height: 2.1; font-size: 13px; }
.bi-links-list a {
    display: inline-block;
    margin-right: 14px;
    color: #555;
    word-break: normal;
    overflow-wrap: break-word;
}
.bi-links-list a:hover { color: var(--bi-red); }

/* ============ Footer ============ */
.bi-footer {
    background: var(--bi-black);
    color: #999;
    padding: 22px 0;
    font-size: 13px;
}
.bi-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.bi-footer a { color: #bbb; margin: 0 8px; }
.bi-footer a:hover { color: #fff; }

/* ============ 回到顶部 ============ */
.bi-gotop {
    position: fixed;
    right: 20px;
    bottom: 40px;
    width: 40px;
    height: 40px;
    background: var(--bi-red);
    color: #fff;
    border: 0;
    border-radius: 3px;
    font-size: 18px;
    cursor: pointer;
    display: none;
    z-index: 99;
}

/* ============================================================
   响应式 —— 必须保持在文件末尾
   ============================================================ */
@media (max-width: 960px) {
    .bi-layout { grid-template-columns: minmax(0, 1fr); }
    .bi-lead { grid-template-columns: minmax(0, 1fr); }
    .bi-lead-side { gap: 12px; }
    .bi-feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bi-catblock { grid-template-columns: minmax(0, 1fr); }
    .bi-header-inner { height: 52px; }
    .bi-logo { font-size: 22px; }
    .bi-nav a { padding: 8px 8px; font-size: 14px; }
    .bi-header-search input { width: 130px; }
}

@media (max-width: 640px) {
    .bi-topbar { display: none; }
    .bi-header-inner { gap: 12px; }
    .bi-header-search { display: none; }
    .bi-nav { gap: 0; }
    .bi-nav a { padding: 8px 7px; font-size: 13.5px; }
    .bi-hero { min-height: 280px; }
    .bi-hero-title { font-size: 24px; letter-spacing: 2px; }
    .bi-hero-inner { padding: 36px 14px 32px; }
    .bi-hero-form input { height: 44px; font-size: 15px; }
    .bi-hero-form button { width: 80px; height: 44px; letter-spacing: 2px; }
    .bi-hotwords { font-size: 12px; }
    .bi-lead-item { grid-template-columns: 110px minmax(0, 1fr); }
    .bi-lead-item img { width: 110px; height: 74px; }
    .bi-feed-grid { grid-template-columns: minmax(0, 1fr); }
    .bi-lead-main .bi-card-title { font-size: 18px; }
    .bi-card-title { font-size: 15.5px; }
    .bi-section-title { font-size: 18px; }
    .bi-gotop { right: 12px; }
}
