/* ============================================================
 * 横评页 · 软件对比台（n4-cmp 前缀，与首页 .hp-page 零交叉）
 * 2026-11-19：对比台由首页 Hero 迁至 /category/news/（横评首页）
 * 2026-11-19 用户要求「恢复之前的背景颜色」→ 恢复首页原深蓝玻璃拟态配色
 *   做法：n4-cmp-box 深蓝底容器 + 内部沿用原 hp-* 的玻璃拟态 / 金色描边配色
 * ============================================================ */
.n4-cmp-wrap {
    margin: 0 0 26px;
}

/* 深蓝底容器：还原首页对比台所依附的深色环境 */
.n4-cmp-box {
    background:
        radial-gradient(ellipse at 88% -20%, rgba(212, 168, 83, .16), transparent 48%),
        linear-gradient(150deg, #0f1e36 0%, #0a1628 62%, #13243f 100%);
    border: 1px solid rgba(212, 168, 83, .32);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
    color: #e6edf7;
}

/* 标题行 */
.n4-cmp-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.n4-cmp-head .t {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; color: #c6d3e4; font-weight: 700; margin-right: 4px;
}
.n4-cmp-head .t svg { color: #d4a853; }
.n4-cmp-head .badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(212, 168, 83, .14); border: 1px solid rgba(212, 168, 83, .4);
    color: #d4a853; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.n4-cmp-head .badge b { color: #fff; font-size: 12.5px; }

/* 分类筛选 */
.n4-cmp-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.n4-cmp-cat {
    padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .04); color: #c6d3e4; font-size: 12px; cursor: pointer;
    transition: all .12s; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px;
}
.n4-cmp-cat.n4-on {
    background: linear-gradient(135deg, #d4a853, #c9a227); color: #241a02; font-weight: 700; border-color: transparent;
}
.n4-cmp-cat:hover:not(.n4-on) { border-color: #d4a853; color: #d4a853; }
.n4-cmp-cat .n { font-weight: 700; margin-left: 3px; }

/* 勾选栏 */
.n4-cmp-pickbar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 10px 12px; margin-top: 10px;
    background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 11px; position: relative;
}
.n4-cmp-pickbar .pl { font-size: 12px; color: #8fa3bd; flex: none; }
.n4-cmp-picked { display: flex; gap: 7px; flex-wrap: wrap; flex: 1; min-width: 0; }
.n4-cmp-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, rgba(212, 168, 83, .22), rgba(212, 168, 83, .1));
    border: 1px solid rgba(212, 168, 83, .5); color: #fff;
    font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
}
.n4-cmp-chip .x { color: #9fb3cc; cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px; transition: color .1s; }
.n4-cmp-chip .x:hover { color: #fff; }
.n4-cmp-add {
    flex: none; display: inline-flex; align-items: center; gap: 5px;
    background: rgba(37, 99, 235, .16); border: 1px solid rgba(59, 130, 246, .4); color: #bcd3ff;
    font-size: 12.5px; padding: 5px 13px; border-radius: 999px; cursor: pointer;
}
.n4-cmp-add:hover { background: rgba(37, 99, 235, .3); }

/* 添加面板：流式布局（原 absolute 浮层在「已选 0/4」时会被弹窗 overflow-y:auto 裁掉下半截） */
.n4-cmp-pop {
    position: static; flex-basis: 100%; width: 100%; margin-top: 6px;
    background: #0f1e36; border: 1px solid rgba(212, 168, 83, .4); border-radius: 12px;
    padding: 10px; z-index: 40; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); display: none;
}
.n4-cmp-pop.n4-open { display: block; }
.n4-cmp-pop input {
    width: 100%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px; color: #fff; font-size: 13px; padding: 8px 11px; outline: none; margin-bottom: 8px;
}
.n4-cmp-pop input::placeholder { color: #7f93ab; }
.n4-cmp-list { max-height: 300px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(212, 168, 83, .4) transparent; }
.n4-cmp-popfoot {
    margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 11.5px; color: #8fa3bd; line-height: 1.5;
}
.n4-cmp-ai {
    display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 7px;
    font-size: 12.5px; color: #c6d3e4; cursor: pointer; transition: background .1s;
}
.n4-cmp-ai:hover { background: rgba(255, 255, 255, .07); }
.n4-cmp-ai.n4-on { color: #d4a853; }
.n4-cmp-ai .st {
    flex: none; width: 15px; height: 15px; border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, .35); display: flex; align-items: center;
    justify-content: center; font-size: 9px; color: #241a02;
}
.n4-cmp-ai.n4-on .st { background: linear-gradient(135deg, #d4a853, #c9a227); border-color: transparent; }
.n4-cmp-ai .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n4-cmp-ai .cty {
    flex: none; font-size: 10px; color: #7f93ab;
    border: 1px solid rgba(255, 255, 255, .16); border-radius: 5px; padding: 0 5px;
}

/* 表格 */
.n4-cmp-table {
    margin-top: 10px;
    border: 1px solid rgba(212, 168, 83, .32); border-radius: 13px; overflow: hidden;
    background: rgba(255, 255, 255, .03);
}
.n4-cmp-row {
    display: grid; grid-template-columns: 170px repeat(var(--cols, 3), 1fr);
    align-items: stretch; border-bottom: 1px solid rgba(255, 255, 255, .08); transition: background .12s;
}
.n4-cmp-row:last-child { border-bottom: none; }
.n4-cmp-row:nth-child(even):not(.n4-cmp-headrow) { background: rgba(255, 255, 255, .028); }
.n4-cmp-row:hover { background: rgba(212, 168, 83, .07); }
.n4-cmp-row.n4-cmp-headrow {
    border-bottom: 1px solid rgba(212, 168, 83, .4);
    background: linear-gradient(135deg, rgba(212, 168, 83, .16), rgba(212, 168, 83, .07));
}
.n4-cmp-c {
    padding: 11px 12px; font-size: 12.5px; line-height: 1.7;
    min-width: 0; overflow-wrap: anywhere; word-break: break-word;
}
.n4-cmp-c.n4-dim {
    font-weight: 700; color: #fff; border-right: 1px solid rgba(255, 255, 255, .08);
    display: flex; align-items: center; gap: 8px; font-size: 13px; position: relative;
}
.n4-cmp-c.n4-dim::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 16px; border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, #d4a853, #c9a227); opacity: .9;
}
.n4-cmp-c.n4-dim svg { flex: none; color: #d4a853; }
.n4-cmp-c.n4-soft { color: #e6edf7; word-break: break-word; }
.n4-cmp-headrow .n4-cmp-c.n4-soft {
    color: #fff; font-weight: 700; font-size: 14px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 7px; min-height: 74px; position: relative;
}
.n4-cmp-headrow .n4-cmp-c.n4-soft::before {
    content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 2px;
    border-radius: 0 0 2px 2px; background: linear-gradient(90deg, rgba(212, 168, 83, .55), transparent);
}
.n4-cmp-headrow .n4-cmp-c.n4-soft .dt { display: block; font-size: 11px; color: #8fa3bd; font-weight: 400; }
.n4-cmp-headrow .n4-cmp-c.n4-soft .dt a {
    display: inline-block; font-size: 11px; color: #241a02;
    background: linear-gradient(135deg, #d4a853, #c9a227); border-radius: 999px; padding: 2px 11px;
    text-decoration: none; font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

/* 维度徽章 */
.n4-cmp-dimrow { display: block; }
.n4-cmp-badge {
    display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700;
    padding: 2px 8px; border-radius: 999px; white-space: nowrap;
    margin: 1px 2px 1px 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); vertical-align: middle;
}
.n4-cmp-badge.y { background: linear-gradient(135deg, #d4a853, #c9a227); color: #241a02; }
.n4-cmp-badge.b { background: rgba(37, 99, 235, .2); color: #bcd3ff; border: 1px solid rgba(59, 130, 246, .4); }
.n4-cmp-badge.g { background: rgba(59, 83, 117, .55); color: #cfe0f2; border: 1px solid rgba(255, 255, 255, .15); }
.n4-cmp-badge.n { background: transparent; color: #8fa3bd; border: 1px dashed rgba(255, 255, 255, .25); box-shadow: none; }

.n4-cmp-c.n4-pld { font-size: 11.5px; color: #8fa3bd; font-style: normal; }
.n4-cmp-c .pld-link {
    color: #241a02; background: linear-gradient(135deg, #d4a853, #c9a227); border-radius: 999px;
    padding: 2px 10px; text-decoration: none; font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1); transition: filter .13s;
}
.n4-cmp-c .pld-link:hover { filter: brightness(1.08); }

/* 空态 */
.n4-cmp-empty {
    color: #7f93ab; font-size: 12px; line-height: 1.8; text-align: center; padding: 34px 20px;
}
.n4-cmp-empty b { color: #c6d3e4; }

/* 底部说明 */
.n4-cmp-foot {
    display: flex; align-items: center; gap: 10px; margin-top: 11px; flex-wrap: wrap;
}
.n4-cmp-foot .note { font-size: 11.5px; color: #8fa3bd; line-height: 1.7; flex: 1; min-width: 200px; }
.n4-cmp-foot .note b { color: #d4a853; font-weight: 600; }
.n4-cmp-foot .all {
    flex: none; font-size: 12.5px; color: #d4a853; text-decoration: none;
    border: 1px solid rgba(212, 168, 83, .4); padding: 7px 16px; border-radius: 999px;
    transition: background .12s; white-space: nowrap;
}
.n4-cmp-foot .all:hover { background: rgba(212, 168, 83, .12); }

/* 提示条 */
.n4-cmp-toast {
    position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
    background: rgba(10, 22, 40, .92); color: #fff; font-size: 13px; padding: 10px 20px;
    border-radius: 999px; z-index: 9999; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

/* ============================================================
 * 2026-11-20 折叠入口条 + 弹窗（默认收起为浅色横条，点击弹出对比台）
 * 入口条 .ncl-* 浅色配色贴合横评页浅色主体；弹窗内 .n4-cmp-* 深蓝内容原样不变
 * ============================================================ */
.n4-cmp-launch {
    margin: 20px 0 22px;
    background: linear-gradient(180deg, #fffdf8, #fbf7ee);
    border: 1px solid #e6d5b2; border-left: 3px solid #c9a227;
    border-radius: 12px; padding: 10px 14px;
    box-shadow: 0 3px 14px rgba(180, 150, 80, .08);
    cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.n4-cmp-launch:hover { box-shadow: 0 6px 20px rgba(180, 150, 80, .16); border-color: #d4a853; }
.n4-cmp-launch-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ncl-ico {
    flex: none; width: 30px; height: 30px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; color: #a9821f;
    background: linear-gradient(135deg, #fbf1d8, #f6e6bd); border: 1px solid #e6cf9a;
}
.ncl-txt { display: flex; flex-direction: column; gap: 1px; flex: none; }
.ncl-txt b { font-size: 14px; color: #1e293b; font-weight: 700; line-height: 1.3; }
.ncl-sub { font-size: 11.5px; color: #8a7a5c; line-height: 1.3; }
.ncl-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 60px; }
.ncl-chip {
    display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600;
    color: #7a5f14; background: #f7edd4; border: 1px solid #e6d2a4;
    padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.ncl-cnt { flex: none; font-size: 12px; color: #8a7a5c; }
.ncl-cnt b { color: #a9821f; font-size: 13px; }
.ncl-btn {
    flex: none; font-size: 12.5px; font-weight: 700; color: #241a02; cursor: pointer;
    background: linear-gradient(135deg, #e0b757, #c9a227); border: none;
    padding: 8px 18px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 2px 8px rgba(180, 145, 50, .28); transition: filter .12s;
}
.ncl-btn:hover { filter: brightness(1.07); }

/* 弹窗遮罩 + 容器 */
.n4-cmp-modal {
    position: fixed; inset: 0; z-index: 9998; display: none;
    align-items: flex-start; justify-content: center; padding: 5vh 16px;
}
.n4-cmp-modal.n4-open { display: flex; }
.n4-cmp-modal-mask { position: absolute; inset: 0; background: rgba(8, 16, 30, .72); backdrop-filter: blur(3px); }
.n4-cmp-modal-box {
    position: relative; width: min(1180px, 100%); max-height: 90vh; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(212,168,83,.5) transparent;
}
.n4-cmp-modal-box .n4-cmp-wrap { margin: 0; }
.n4-cmp-modal-box .n4-cmp-head { padding-right: 42px; }
.n4-cmp-modal-x {
    position: absolute; top: 10px; right: 12px; z-index: 60;
    width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
    background: rgba(10, 22, 40, .9); color: #fff; border: 1px solid rgba(212, 168, 83, .6);
    font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center;
    transition: background .12s;
}
.n4-cmp-modal-x:hover { background: #c9a227; color: #241a02; }

@media (max-width: 620px) {
    .n4-cmp-launch { padding: 10px; }
    .ncl-txt b { font-size: 13px; }
    .ncl-chips { order: 5; flex-basis: 100%; }
    .ncl-btn { margin-left: auto; }
    .n4-cmp-modal { padding: 0; }
    .n4-cmp-modal-box { max-height: 100vh; height: 100vh; border-radius: 0; }
    .n4-cmp-modal-box .n4-cmp-box { border-radius: 0; }
}

/* ============================================================
 * 2026-11-20 整体布局比例优化（.n4 作用域，本表在 style.css 之后加载，覆盖其 .n4 重复块）
 * 统一层级：H1 32 / 卡片标题 17 / 正文 13.5 / 元信息 12；收敛 Hero、加厚收起条、统一列表与侧栏
 * ============================================================ */
/* —— Hero：收敛过大标题与留白，消除「的讲」孤字换行 —— */
.n4 .n4-hero { padding: 34px 36px; }
.n4 .n4-grid2 { gap: 30px; }
.n4 .n4-hero .en { font-size: 11px; letter-spacing: 2.5px; margin-bottom: 10px; }
.n4 .n4-kicker { font-size: 12px; padding: 4px 14px; margin-bottom: 14px; }
.n4 .n4-hero h1 { font-size: 32px; line-height: 1.42; margin-bottom: 12px; }
.n4 .n4-hero-desc { font-size: 14px; line-height: 1.75; margin-bottom: 20px; }
.n4 .n4-cta { font-size: 14px; padding: 9px 22px; }
.n4 .n4-hero-cta { margin-bottom: 20px; }
.n4 .n4-hstats { gap: 28px; padding-top: 15px; }
.n4 .n4-hstats .stat b { font-size: 23px; }
.n4 .n4-hstats .stat span { font-size: 12px; }
.n4 .n4-flashcard { padding: 19px 20px; }
.n4 .n4-flashcard .st { font-size: 11px; margin-bottom: 11px; }
.n4 .n4-flashitem { padding: 9px 0; }
.n4 .n4-flashitem .info b { font-size: 13px; }
.n4 .n4-flashitem .info span { font-size: 11.5px; }
.n4 .n4-flashcard .foot2 { font-size: 11.5px; margin-top: 12px; padding-top: 12px; }

/* —— 收起条：加厚到与 Hero / 列表协调的高度 —— */
.n4-cmp-launch { padding: 14px 18px; margin-bottom: 18px; }
.ncl-ico { width: 36px; height: 36px; border-radius: 10px; }
.ncl-ico svg { width: 19px; height: 19px; }
.ncl-txt b { font-size: 15px; }
.ncl-sub { font-size: 12px; }
.ncl-chip { font-size: 12px; padding: 4px 11px; }
.ncl-cnt { font-size: 12.5px; }
.ncl-btn { font-size: 13px; padding: 10px 22px; }

/* —— 列表：统一卡片标题/正文/元信息字号，缩小双头条差异 —— */
.n4 .n4-subnavwrap { margin-top: 16px; padding: 13px 18px; }
.n4 .n4-subnavwrap .nm { font-size: 15px; }
.n4 .n4-main { margin-top: 18px; gap: 22px; }
.n4 .n4-tops { gap: 14px; }
.n4 .n4-hotcard, .n4 .n4-featcard { padding: 19px 20px; border-radius: 13px; }
.n4 .n4-hotcard h3, .n4 .n4-featcard h3 { font-size: 17px; line-height: 1.55; }
.n4 .n4-hotcard .sum, .n4 .n4-featcard .sum { font-size: 13px; }
.n4 .n4-timeline { margin-top: 20px; }
.n4 .n4-tlgroup { margin-bottom: 18px; }
.n4 .n4-tlhead .d { font-size: 15px; }
.n4 .n4-tlcard { padding: 18px 20px; }
.n4 .n4-tlcard h4 { font-size: 16px; }
.n4 .n4-tlcard .sum { font-size: 13px; }
.n4 .n4-tlcard .foot { font-size: 12px; }

/* —— 侧栏：与列表同节奏，卡片内边距/字号收敛 —— */
.n4 .n4-side { gap: 14px; }
.n4 .n4-scard { padding: 17px 18px; border-radius: 13px; }
.n4 .n4-scard .st { font-size: 13.5px; margin-bottom: 12px; }
.n4 .n4-istat { padding: 10px 8px; }
.n4 .n4-istat b { font-size: 20px; }
.n4 .n4-istat span { font-size: 11.5px; }
.n4 .n4-catlink { padding: 11px 12px; }
.n4 .n4-catlink .info b { font-size: 13px; }
.n4 .n4-catlink .info span { font-size: 11.5px; }
.n4 .n4-hot a { font-size: 13px; }
.n4 .n4-linklist a { font-size: 13px; }

@media (max-width: 1020px) {
    .n4 .n4-hero { padding: 28px 24px; }
    .n4 .n4-grid2 { gap: 24px; }
}
@media (max-width: 640px) {
    .n4 .n4-hero { padding: 22px 18px; }
    .n4 .n4-hero h1 { font-size: 26px; }
    .n4 .n4-hstats { gap: 16px; }
    .n4 .n4-flashcard { padding: 16px; }
    .n4 .n4-subnavwrap { padding: 12px 14px; }
    .n4 .n4-tlcard { padding: 16px; }
    .n4 .n4-hotcard, .n4 .n4-featcard { padding: 16px; }
}

@media (max-width: 860px) {
    .n4-cmp-cats { margin-left: 0; width: 100%; }
    .n4-cmp-row { grid-template-columns: 120px repeat(var(--cols, 3), 1fr); }
    .n4-cmp-c { padding: 9px 8px; font-size: 12px; }
    .n4-cmp-headrow .n4-cmp-c.n4-soft { font-size: 12.5px; min-height: 60px; gap: 5px; }
}
@media (max-width: 620px) {
    .n4-cmp-box { padding: 12px; border-radius: 14px; }
    .n4-cmp-row { grid-template-columns: 92px repeat(var(--cols, 2), 1fr); }
    .n4-cmp-c.n4-dim { font-size: 12px; }
    .n4-cmp-headrow .n4-cmp-c.n4-soft { font-size: 12px; }
    .n4-cmp-foot .all { width: 100%; text-align: center; }
}
