/* ==========================================================================
   内容页 v2（列表 / 详情）—— 与首页 home-v2 同一套视觉语言
   作用域：body.cv2，不影响任何未加该类的页面
   ========================================================================== */

.cv2 {
    --cv-ink: #14121c;
    --cv-ink2: #34303f;
    --cv-muted: #6b6580;
    --cv-brand: #6D2DCC;
    --cv-brand2: #8b5cf6;
    --cv-brand-ink: #4c1d95;
    --cv-line: #ece6f9;
    --cv-bg: #f6f5fa;
    --cv-radius: 18px;
    --cv-shadow: 0 26px 60px -34px rgba(76, 29, 149, .38);
    background: var(--cv-bg);
    color: var(--cv-ink);
    -webkit-font-smoothing: antialiased;
}

.cv2 .cv-container {
    width: min(1180px, calc(100% - 2.5rem));
    margin: 0 auto;
}

/* ---------- 1. 深色页头（列表 / 详情共用） ---------- */
.cv-hero,
.cv-list-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(78rem 36rem at 86% -18%, rgba(139, 92, 246, .5), transparent 62%),
        radial-gradient(52rem 28rem at 2% 112%, rgba(56, 189, 248, .16), transparent 60%),
        linear-gradient(135deg, #150a2b 0%, #2b1063 52%, #43169b 100%);
}

.cv-hero::before,
.cv-list-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(72% 62% at 42% 40%, #000 0%, transparent 100%);
    mask-image: radial-gradient(72% 62% at 42% 40%, #000 0%, transparent 100%);
    pointer-events: none;
}

.cv-hero { padding: .4rem 0 3.6rem; }
.cv-list-hero { padding: .4rem 0 3.2rem; }
.cv-hero .cv-container,
.cv-list-hero .cv-container { position: relative; z-index: 2; }

.cv-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    padding: .85rem 0 1.9rem;
    font-size: .76rem;
    color: rgba(255, 255, 255, .52);
}

.cv-crumb a { color: rgba(255, 255, 255, .74); }
.cv-crumb a:hover { color: #fff; }
.cv-crumb i { font-style: normal; color: rgba(255, 255, 255, .3); }
.cv-crumb span {
    max-width: 42ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, .85);
}

.cv-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.cv-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .8rem;
    border: 1px solid rgba(196, 181, 253, .38);
    border-radius: 999px;
    background: rgba(139, 92, 246, .18);
    color: #ddd0ff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
}

.cv-kicker::before {
    content: "";
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, .22);
}

.cv-hero h1 {
    margin: .95rem 0 .85rem;
    font-size: clamp(1.45rem, 2.5vw, 2.1rem);
    font-weight: 800;
    line-height: 1.34;
    letter-spacing: -.012em;
    color: #fff;
}

.cv-lead {
    margin: 0 0 1.15rem;
    max-width: 62ch;
    color: rgba(255, 255, 255, .74);
    font-size: .93rem;
    line-height: 1.85;
}

.cv-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.cv-meta span {
    padding: .28rem .7rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .7);
    font-size: .72rem;
}

.cv-cover {
    position: relative;
    margin: 0;
    border-radius: var(--cv-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 34px 70px -34px rgba(0, 0, 0, .8);
    background: #1d1235;
    line-height: 0;
}

.cv-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 12 / 7;
    object-fit: cover;
}

/* ---------- 2. 详情页正文区 ---------- */
.cv-body {
    padding: 0 0 clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(180deg, var(--cv-bg) 0%, var(--cv-bg) 100%);
}

.cv-body .cv-container {
    position: relative;
    z-index: 3;
    margin-top: -2.6rem;
}

.cv-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 1.85rem;
    align-items: start;
}

.cv-paper {
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2.7rem);
    border: 1px solid #efe9fb;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--cv-shadow);
}

/* 目录 */
.cv-toc {
    margin-bottom: 2rem;
    padding: 1.05rem 1.2rem;
    border: 1px solid #e6dbfd;
    border-radius: 14px;
    background: linear-gradient(135deg, #faf7ff 0%, #f2ebff 100%);
}

.cv-toc b {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--cv-brand-ink);
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.cv-toc b::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--cv-brand);
}

.cv-toc ol {
    margin: .65rem 0 0;
    padding-left: 1.05rem;
    columns: 2;
    column-gap: 1.6rem;
    font-size: .84rem;
    line-height: 1.9;
    color: var(--cv-ink2);
}

.cv-toc li { break-inside: avoid; }
.cv-toc a { color: #4a3f63; }
.cv-toc a:hover { color: var(--cv-brand); }

/* 正文排版 */
.cv2 .article-content {
    color: #2e2a3a;
    font-size: 1.02rem;
    line-height: 1.95;
    word-break: break-word;
}

.cv2 .article-content > *:first-child { margin-top: 0; }

.cv2 .article-content h2 {
    position: relative;
    margin: 2.3rem 0 1rem;
    padding-left: .9rem;
    border-left: 4px solid var(--cv-brand);
    color: var(--cv-ink);
    font-size: clamp(1.16rem, 1.7vw, 1.34rem);
    font-weight: 800;
    line-height: 1.55;
    scroll-margin-top: 90px;
}

.cv2 .article-content h3 {
    position: relative;
    margin: 1.7rem 0 .7rem;
    padding-left: 1.05rem;
    color: var(--cv-brand-ink);
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.6;
    scroll-margin-top: 90px;
}

.cv2 .article-content h3::before {
    content: "";
    position: absolute;
    left: .15rem;
    top: .62em;
    width: .42rem;
    height: .42rem;
    border-radius: 2px;
    background: var(--cv-brand2);
    transform: rotate(45deg);
}

.cv2 .article-content h4 {
    margin: 1.3rem 0 .5rem;
    color: var(--cv-ink);
    font-size: .98rem;
    font-weight: 700;
}

.cv2 .article-content p {
    margin: 0 0 1.05rem;
}

.cv2 .article-content strong,
.cv2 .article-content b {
    color: var(--cv-ink);
    font-weight: 700;
    background: linear-gradient(transparent 64%, rgba(139, 92, 246, .18) 0);
}

.cv2 .article-content a {
    color: var(--cv-brand);
    text-decoration: underline;
    text-decoration-color: rgba(109, 45, 204, .3);
    text-underline-offset: 3px;
}

.cv2 .article-content a:hover {
    color: var(--cv-brand-ink);
    text-decoration-color: currentColor;
}

.cv2 .article-content ul,
.cv2 .article-content ol {
    margin: 0 0 1.15rem;
    padding-left: 1.3rem;
}

.cv2 .article-content li { margin-bottom: .45rem; }
.cv2 .article-content li::marker { color: var(--cv-brand2); }

.cv2 .article-content blockquote {
    margin: 1.4rem 0;
    padding: .9rem 1.15rem;
    border-left: 3px solid var(--cv-brand2);
    border-radius: 0 10px 10px 0;
    background: #f8f5ff;
    color: #4a4160;
    font-size: .95rem;
}

.cv2 .article-content blockquote p:last-child { margin-bottom: 0; }

.cv2 .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: .6rem 0 1.2rem;
}

.cv2 .article-content figure { margin: 1.2rem 0; }

.cv2 .article-content figcaption {
    margin-top: .4rem;
    color: var(--cv-muted);
    font-size: .78rem;
    text-align: center;
}

.cv2 .article-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px dashed #e3daf5;
}

/* 表格：横向可滚，避免窄屏挤碎 */
.cv2 .article-content table {
    width: 100%;
    margin: 1.1rem 0 1.5rem;
    border-collapse: collapse;
    font-size: .9rem;
    line-height: 1.7;
}

.cv2 .article-content thead th {
    padding: .62rem .75rem;
    border-bottom: 2px solid #ded1fa;
    background: #f6f1ff;
    color: var(--cv-brand-ink);
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.cv2 .article-content tbody td,
.cv2 .article-content tbody th {
    padding: .58rem .75rem;
    border-bottom: 1px solid #f0ebfa;
    vertical-align: top;
}

.cv2 .article-content tbody tr:nth-child(even) { background: #fbf9ff; }
.cv2 .article-content tbody th { color: var(--cv-ink); font-weight: 600; }

/* 文末 CTA */
.cv-cta-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.2rem;
    padding: 1.35rem 1.5rem;
    border-radius: 16px;
    background:
        radial-gradient(30rem 16rem at 100% 0%, rgba(139, 92, 246, .55), transparent 62%),
        linear-gradient(120deg, #1e0d3b 0%, #2f1160 58%, #3b1580 100%);
    color: #fff;
}

.cv-cta-band .cv-cta-title {
    margin: 0 0 .3rem;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.5;
}

.cv-cta-band p {
    margin: 0;
    color: rgba(255, 255, 255, .7);
    font-size: .82rem;
}

.cv-card--dark .cv-cta-title {
    margin: 0 0 .5rem;
    color: #fff;
    font-size: .98rem;
    font-weight: 800;
    line-height: 1.5;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .62rem 1.15rem;
    border-radius: 999px;
    background: #fff;
    color: var(--cv-brand-ink) !important;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cv-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .6);
    color: var(--cv-brand-ink);
}

/* 上下篇 */
.cv-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
    margin-top: 1.4rem;
}

.cv-pager a,
.cv-pager span {
    display: block;
    padding: .9rem 1.05rem;
    border: 1px solid var(--cv-line);
    border-radius: 12px;
    background: #fcfbff;
    color: var(--cv-ink2);
    font-size: .86rem;
    line-height: 1.6;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}

.cv-pager a:hover {
    border-color: #cdb8f5;
    transform: translateY(-2px);
    color: var(--cv-brand-ink);
}

.cv-pager em {
    display: block;
    margin-bottom: .2rem;
    color: var(--cv-muted);
    font-size: .7rem;
    font-style: normal;
    letter-spacing: .08em;
}

.cv-pager .is-next { text-align: right; }
.cv-pager .is-empty { opacity: .45; }

/* ---------- 3. 侧栏 ---------- */
.cv-aside {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.cv-card {
    padding: 1.15rem;
    border: 1px solid #efe9fb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px -32px rgba(76, 29, 149, .5);
}

.cv-card--dark {
    border: 0;
    background:
        radial-gradient(24rem 14rem at 100% 0%, rgba(139, 92, 246, .55), transparent 62%),
        linear-gradient(160deg, #1e0d3b 0%, #2f1160 62%, #3b1580 100%);
    color: #fff;
    box-shadow: 0 24px 50px -28px rgba(30, 13, 59, .7);
}

.cv-card--dark h2,
.cv-card--dark h3 {
    margin: 0 0 .5rem;
    color: #fff;
    font-size: .98rem;
    font-weight: 800;
}

.cv-card--dark p {
    margin: 0 0 .9rem;
    color: rgba(255, 255, 255, .7);
    font-size: .8rem;
    line-height: 1.75;
}

.cv-card-head {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .7rem;
    color: var(--cv-ink);
    font-size: .88rem;
    font-weight: 800;
}

.cv-card-head::before {
    content: "";
    width: 3px;
    height: 13px;
    border-radius: 2px;
    background: var(--cv-brand);
}

.cv-rel { display: grid; gap: .15rem; }

.cv-rel a {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: .65rem;
    align-items: center;
    padding: .55rem 0;
    border-bottom: 1px dashed #f0ebfa;
    color: var(--cv-ink2);
    font-size: .82rem;
    line-height: 1.55;
    text-decoration: none;
}

.cv-rel a:last-child { border-bottom: 0; }
.cv-rel a:hover { color: var(--cv-brand); }

.cv-rel img {
    width: 62px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
}

.cv-rel span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cv-aside-list {
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .84rem;
}

.cv-aside-list a { color: var(--cv-ink2); }
.cv-aside-list a:hover { color: var(--cv-brand); }

/* ---------- 4. 列表页 ---------- */
.cv-list-hero h1 {
    margin: .2rem 0 .7rem;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -.015em;
    color: #fff;
}

.cv-list-hero .cv-lead { max-width: 68ch; }

.cv-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem 2.4rem;
    margin-top: 1.5rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, .16);
}

.cv-stat-row b {
    display: block;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.35;
}

.cv-stat-row span {
    color: rgba(255, 255, 255, .58);
    font-size: .75rem;
}

.cv-list-body { padding: clamp(2rem, 4vw, 2.8rem) 0 3rem; }

.cv-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
    margin-bottom: 1.5rem;
}

.cv-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.cv-tabs a,
.cv-tabs span {
    padding: .42rem .95rem;
    border: 1px solid #e6ddf9;
    border-radius: 999px;
    background: #fff;
    color: var(--cv-ink2);
    font-size: .82rem;
    text-decoration: none;
}

.cv-tabs .is-on {
    border-color: transparent;
    background: linear-gradient(120deg, #6D2DCC, #8b5cf6);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 24px -14px rgba(109, 45, 204, .8);
}

.cv-tabs a:hover { border-color: #cdb8f5; color: var(--cv-brand-ink); }

.cv-count { color: var(--cv-muted); font-size: .8rem; }

.cv-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.45rem;
}

.cv-post {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #efe9fb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 34px -30px rgba(76, 29, 149, .55);
    color: inherit;
    text-decoration: none;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.cv-post:hover {
    transform: translateY(-5px);
    border-color: #d9c8f8;
    box-shadow: 0 30px 50px -32px rgba(76, 29, 149, .55);
    color: inherit;
}

.cv-post-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #efe9fb;
}

.cv-post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.cv-post:hover .cv-post-media img { transform: scale(1.045); }

.cv-post-badge {
    position: absolute;
    top: .7rem;
    left: .7rem;
    padding: .24rem .6rem;
    border-radius: 999px;
    background: rgba(21, 10, 43, .78);
    color: #e9ddff;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .02em;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.cv-post-badge.is-foreign { background: rgba(13, 148, 136, .82); color: #e6fffb; }

.cv-post-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .45rem;
    padding: .95rem 1rem 1.1rem;
}

.cv-post-body h2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    color: var(--cv-ink);
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.6;
}

.cv-post-body p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    color: var(--cv-muted);
    font-size: .8rem;
    line-height: 1.7;
}

.cv-post-body time {
    margin-top: auto;
    padding-top: .35rem;
    color: #9d97ad;
    font-size: .73rem;
}

.cv-empty {
    padding: 3rem 1rem;
    border: 1px dashed #ddd2f5;
    border-radius: 16px;
    background: #fff;
    color: var(--cv-muted);
    text-align: center;
    font-size: .9rem;
}

/* 分页：覆盖 Bootstrap 默认蓝 */
.cv2 .pagination {
    --bs-pagination-color: var(--cv-ink2);
    --bs-pagination-bg: #fff;
    --bs-pagination-border-color: #e6ddf9;
    --bs-pagination-hover-color: var(--cv-brand-ink);
    --bs-pagination-hover-bg: #f6f1ff;
    --bs-pagination-hover-border-color: #cdb8f5;
    --bs-pagination-active-bg: var(--cv-brand);
    --bs-pagination-active-border-color: var(--cv-brand);
    --bs-pagination-disabled-color: #b6b0c4;
    --bs-pagination-disabled-bg: #f7f6fa;
    --bs-pagination-disabled-border-color: #eeebf5;
    gap: .3rem;
}

.cv2 .pagination .page-link {
    border-radius: 10px;
    font-size: .84rem;
    padding: .45rem .8rem;
}

/* ---------- 5. 响应式 ---------- */
@media (max-width: 991.98px) {
    .cv-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .cv-cover { order: 2; max-width: 620px; }
    .cv-hero-copy { order: 1; }
    .cv-layout { grid-template-columns: minmax(0, 1fr); }
    .cv-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cv-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cv-body .cv-container { margin-top: -1.8rem; }
    .cv2 .article-content table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; }
    .cv2 .article-content table thead { display: table-header-group; }
}

@media (max-width: 767.98px) {
    .cv-post-grid { grid-template-columns: minmax(0, 1fr); }
    .cv-aside { grid-template-columns: minmax(0, 1fr); }
    .cv-toc ol { columns: 1; }
    .cv-pager { grid-template-columns: minmax(0, 1fr); }
    .cv-pager .is-next { text-align: left; }
    .cv-stat-row { gap: 1rem 1.6rem; }
}

@media (max-width: 575.98px) {
    .cv2 .cv-container { width: calc(100% - 1.6rem); }
    .cv-hero { padding: .2rem 0 2.6rem; }
    .cv-list-hero { padding: .2rem 0 2.4rem; }
    .cv-crumb { padding: .7rem 0 1.2rem; }
    .cv-crumb span { max-width: 26ch; }
    .cv-paper { padding: 1.1rem .95rem; border-radius: 16px; }
    .cv-body .cv-container { margin-top: -1.4rem; }
    .cv2 .article-content { font-size: .98rem; line-height: 1.9; }
    .cv2 .article-content h2 { margin-top: 1.9rem; font-size: 1.1rem; }
    .cv-cta-band { padding: 1.15rem; }
    .cv-cta-band .cv-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .cv2 .cv-post,
    .cv2 .cv-post-media img,
    .cv-btn,
    .cv-pager a { transition: none; }
}

/* 列表页页头：右侧远端放一枚极淡的人脑，和首页呼应 */
.cv-list-hero::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -3%;
    z-index: 1;
    width: min(44%, 600px);
    height: 150%;
    transform: translateY(-50%);
    background: url("/img/hero/brain-hero.webp") no-repeat center / contain;
    opacity: .2;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(52% 56% at 50% 50%, #000 20%, transparent 78%);
    mask-image: radial-gradient(52% 56% at 50% 50%, #000 20%, transparent 78%);
}

@media (max-width: 991.98px) {
    .cv-list-hero::after { width: 72%; right: -22%; opacity: .14; }
}


/* 产品列表：4 项单行 */
.cv-post-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.15rem; }

@media (max-width: 1199.98px) {
    .cv-post-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .cv-post-grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.cv-post-grid--4 .cv-post-body h2 { font-size: 1rem; }


/* 长文本表格：窄屏允许换行，避免横向滚太远 */
@media (max-width: 991.98px) {
    .cv2 .article-content table.soft-wrap { white-space: normal; }
    .cv2 .article-content table.soft-wrap thead th,
    .cv2 .article-content table.soft-wrap tbody td,
    .cv2 .article-content table.soft-wrap tbody th { white-space: normal; min-width: 4.2rem; vertical-align: top; }
}
