/* ==========================================================================
   智能开发大师 · 官网文章页（栏目列表 / 文章详情）
   只负责文章相关的骨架，配色与圆角沿用 site.css 里的变量，
   这样首页改版时两边的观感还是一套。
   ========================================================================== */

.art-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line, #e6ebf3);
}

.art-nav-in {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
    height: 66px;
}

.art-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16.5px;
    color: var(--ink, #0f172a);
    text-decoration: none;
    flex: none;
}

.art-brand img { border-radius: 9px; }

.art-brand em {
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--brand, #2e6bff);
    background: rgba(46, 107, 255, .1);
    border: 1px solid rgba(46, 107, 255, .18);
    padding: 2px 6px;
    border-radius: 6px;
}

.art-links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    overflow: auto;
    scrollbar-width: none;
}

.art-links::-webkit-scrollbar { display: none; }

.art-links a {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2, #334155);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.art-links a:hover { color: var(--brand, #2e6bff); }
.art-links a.on { color: var(--brand, #2e6bff); border-bottom-color: var(--brand, #2e6bff); }

.art-cta {
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand, #2e6bff), var(--brand-2, #22cdee));
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px -10px rgba(46, 107, 255, .8);
}

.art-main {
    min-height: 70vh;
    padding: 34px 0 70px;
    background: #f7f9fd;
}

.art-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

.art-wrap-narrow { max-width: 880px; }

/* ---------- 面包屑 ---------- */
.art-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--muted, #64748b);
    margin-bottom: 18px;
}

.art-crumb a { color: var(--muted, #64748b); text-decoration: none; }
.art-crumb a:hover { color: var(--brand, #2e6bff); }
.art-crumb span[aria-current] { color: var(--ink-2, #334155); font-weight: 600; }
.art-crumb span[aria-hidden] { color: #cbd5e1; }

/* ---------- 栏目头 ---------- */
.art-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    padding: 26px 30px;
    margin-bottom: 26px;
    border: 1px solid var(--line, #e6ebf3);
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f2f7ff 100%);
    box-shadow: 0 22px 50px -40px rgba(23, 58, 140, .5);
}

.art-hero-txt { max-width: 760px; }

.art-hero h1 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--ink, #0f172a);
}

.art-hero-desc {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.9;
    color: var(--ink-2, #334155);
}

.art-hero-meta {
    display: flex;
    gap: 18px;
    font-size: 12.5px;
    color: var(--muted, #64748b);
    white-space: nowrap;
}

.art-hero-meta b { color: var(--brand, #2e6bff); font-size: 16px; }

/* ---------- 瀑布流 ---------- */
.art-grid {
    /* 逐个从左到右填满一行再换行：用 grid 而不是 column-count，
       column-count 是「先竖着分栏」，文章数除不尽时最后一列会留下整块空白。 */
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.art-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line, #e6ebf3);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.art-card:hover {
    transform: translateY(-3px);
    border-color: rgba(46, 107, 255, .35);
    box-shadow: 0 20px 40px -26px rgba(23, 58, 140, .45);
}

.art-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.art-card-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef2f8;
}

.art-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.art-card:hover .art-card-cover img { transform: scale(1.04); }

.art-card-body {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.art-card-body h2,
.art-card-body h3 {
    margin: 0 0 10px;
    font-size: 16.5px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--ink, #0f172a);
}

.art-card-body p {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.85;
    color: var(--muted, #64748b);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.art-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: #94a3b8;
    padding-top: 12px;
    border-top: 1px dashed #eef2f8;
}

/* ---------- 分页 ---------- */
.art-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.art-pg-btn,
.art-pg-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line, #e6ebf3);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2, #334155);
    text-decoration: none;
    transition: .18s;
}

.art-pg-btn:hover,
.art-pg-num:hover { border-color: var(--brand, #2e6bff); color: var(--brand, #2e6bff); }

.art-pg-num.is-on {
    background: linear-gradient(135deg, var(--brand, #2e6bff), var(--brand-2, #22cdee));
    border-color: transparent;
    color: #fff;
}

.art-pg-btn.is-off { color: #cbd5e1; cursor: not-allowed; }
.art-pg-gap { color: #cbd5e1; padding: 0 2px; }

.art-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--muted, #64748b);
    background: #fff;
    border: 1px dashed var(--line, #e6ebf3);
    border-radius: 16px;
}

/* ---------- 文章库分区 ---------- */
.art-sec { margin-top: 38px; }

.art-sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.art-sec-head h2 { margin: 0; font-size: 21px; }
.art-sec-head h2 a { color: var(--ink, #0f172a); text-decoration: none; }
.art-more { font-size: 12.5px; color: var(--brand, #2e6bff); text-decoration: none; font-weight: 600; }

/* ---------- 详情页 ---------- */
.art-article {
    background: #fff;
    border: 1px solid var(--line, #e6ebf3);
    border-radius: 20px;
    padding: 44px 56px 38px;
    box-shadow: 0 30px 60px -50px rgba(23, 58, 140, .6);
}

.art-art-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--brand, #2e6bff);
    background: rgba(46, 107, 255, .09);
    border-radius: 7px;
    padding: 4px 10px;
    text-decoration: none;
    margin-bottom: 16px;
}

.art-art-head h1 {
    margin: 0 0 16px;
    font-size: 34px;
    line-height: 1.38;
    letter-spacing: -.01em;
    color: var(--ink, #0f172a);
}

.art-art-lead {
    margin: 0 0 20px;
    padding-left: 14px;
    border-left: 3px solid rgba(46, 107, 255, .35);
    font-size: 14.5px;
    line-height: 1.9;
    color: var(--ink-2, #334155);
}

.art-art-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 22px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12.5px;
    color: var(--muted, #64748b);
}

.art-like button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line, #e6ebf3);
    background: #fff;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2, #334155);
    cursor: pointer;
    transition: .18s;
}

.art-like button:hover { border-color: #fda4af; color: #e11d48; }
.art-like button.is-on { border-color: #fda4af; background: #fff1f2; color: #e11d48; }
.art-like b { font-weight: 700; }

.art-share { color: #94a3b8; }

/* ---------- 正文排版 ---------- */
.art-prose {
    padding: 26px 0 8px;
    font-size: 15.5px;
    line-height: 2.05;
    color: #1f2937;
    word-break: break-word;
}

.art-prose > *:first-child { margin-top: 0; }

.art-prose h2 {
    margin: 44px 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--brand, #2e6bff);
    font-size: 21px;
    line-height: 1.5;
    color: var(--ink, #0f172a);
}

.art-prose h3 {
    margin: 32px 0 12px;
    font-size: 17px;
    color: var(--ink, #0f172a);
}

.art-prose h4 { margin: 24px 0 10px; font-size: 15.5px; color: var(--ink-2, #334155); }

.art-prose p { margin: 0 0 18px; }

.art-prose a { color: var(--brand, #2e6bff); text-decoration: underline; text-underline-offset: 3px; }

.art-prose img {
    display: block;
    width: 100%;
    height: auto;
    margin: 26px auto;
    border-radius: 14px;
    border: 1px solid var(--line, #e6ebf3);
    background: #f1f5f9;
}

.art-prose figure { margin: 26px 0; }

.art-prose figure img { margin: 0 auto 10px; }

.art-prose figcaption {
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted, #7b8794);
}

.art-prose ul,
.art-prose ol { margin: 0 0 20px; padding-left: 24px; }
.art-prose li { margin-bottom: 8px; }

.art-prose blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 4px solid rgba(46, 107, 255, .4);
    background: #f6f9ff;
    border-radius: 0 12px 12px 0;
    color: var(--ink-2, #334155);
    font-size: 14.5px;
}

.art-prose blockquote p:last-child { margin-bottom: 0; }

.art-prose code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
    background: #f1f5f9;
    border-radius: 5px;
    padding: 2px 6px;
    color: #0f172a;
}

.art-prose pre {
    margin: 22px 0;
    padding: 18px 20px;
    border-radius: 14px;
    background: #0b1220;
    color: #cbd5e1;
    overflow: auto;
    font-size: 13px;
    line-height: 1.8;
}

.art-prose pre code { background: transparent; color: inherit; padding: 0; }

.art-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 13.5px;
}

.art-prose th,
.art-prose td {
    border: 1px solid var(--line, #e6ebf3);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.art-prose th { background: #f7f9fd; font-weight: 700; color: var(--ink, #0f172a); }

/* ---------- 文末下载区 ---------- */
.art-art-foot { margin-top: 34px; padding-top: 26px; border-top: 1px solid #f1f5f9; }

.art-dl-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
    padding: 24px 26px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef5ff, #eafafd);
    border: 1px solid rgba(46, 107, 255, .16);
}

.art-dl-box strong { display: block; font-size: 16px; color: var(--ink, #0f172a); margin-bottom: 8px; }
.art-dl-box p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink-2, #334155); max-width: 520px; }

.art-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand, #2e6bff), var(--brand-2, #22cdee));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 12px 26px -14px rgba(46, 107, 255, .9);
}

.art-dl-btn-lg { height: 46px; padding: 0 26px; font-size: 14.5px; }
.art-dl-btn:hover { filter: brightness(1.05); }

/* ---------- 上/下篇 ---------- */
.art-adj {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 22px;
}

.art-adj-item {
    display: block;
    padding: 15px 18px;
    border: 1px solid var(--line, #e6ebf3);
    border-radius: 13px;
    background: #fff;
    text-decoration: none;
    transition: .18s;
    min-height: 76px;
}

.art-adj-item em {
    display: block;
    font-style: normal;
    font-size: 11.5px;
    color: var(--muted, #64748b);
    margin-bottom: 6px;
}

.art-adj-item b {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink, #0f172a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

a.art-adj-item:hover { border-color: var(--brand, #2e6bff); box-shadow: 0 12px 26px -20px rgba(23, 58, 140, .6); }
.art-adj-item.is-off { background: #fafbfe; }
.art-adj-item.is-off b { color: #b6c0cf; font-weight: 600; }

/* ---------- 相关阅读 ---------- */
.art-related {
    margin-top: 26px;
    padding: 26px 30px;
    border: 1px solid var(--line, #e6ebf3);
    border-radius: 18px;
    background: #fff;
}

.art-related h2 { margin: 0 0 16px; font-size: 17px; color: var(--ink, #0f172a); }

.art-related-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.art-related-list a {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fafc;
    text-decoration: none;
    transition: .18s;
}

.art-related-list a:hover { background: #eef5ff; }
.art-related-list strong { display: block; font-size: 13.5px; color: var(--ink, #0f172a); margin-bottom: 6px; line-height: 1.55; }
.art-related-list span { font-size: 12px; color: var(--muted, #64748b); line-height: 1.7; }

/* ---------- 页脚 ---------- */
.art-foot {
    border-top: 1px solid var(--line, #e6ebf3);
    background: #fff;
    padding: 46px 0 28px;
}

.art-foot-in { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.art-foot-main {
    display: grid;
    grid-template-columns: 1.6fr .8fr .8fr 1.2fr;
    gap: 34px;
    padding-bottom: 30px;
}

.art-foot-brand p {
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--muted, #64748b);
    max-width: 320px;
}

.art-foot-col h4 {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-2, #334155);
}

.art-foot-col a {
    display: block;
    font-size: 13px;
    color: var(--muted, #64748b);
    text-decoration: none;
    padding: 5px 0;
}

.art-foot-col a:hover { color: var(--brand, #2e6bff); }

.art-foot-dl strong { display: block; font-size: 14.5px; color: var(--ink, #0f172a); margin-bottom: 8px; }
.art-foot-dl p { margin: 0 0 14px; font-size: 12.5px; line-height: 1.8; color: var(--muted, #64748b); }

.art-foot-legal {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: var(--muted, #64748b);
}

.art-foot-legal a { color: var(--muted, #64748b); text-decoration: none; }
.art-foot-legal a:hover { color: var(--brand, #2e6bff); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .art-foot-main { grid-template-columns: 1fr 1fr; }
    .art-article { padding: 30px 28px 26px; }
}

@media (max-width: 720px) {
    .art-nav-in { height: 58px; padding: 0 16px; gap: 12px; }
    .art-brand span { display: none; }
    .art-links { gap: 16px; }
    .art-links a { font-size: 13px; }
    .art-cta { display: none; }
    .art-wrap { padding: 0 16px; }
    .art-main { padding: 22px 0 50px; }
    .art-hero { padding: 20px; }
    .art-hero h1 { font-size: 23px; }
    .art-grid { grid-template-columns: 1fr; gap: 16px; }
    .art-article { padding: 22px 18px; border-radius: 16px; }
    .art-art-head h1 { font-size: 22px; }
    .art-prose { font-size: 15px; line-height: 1.95; }
    .art-prose h2 { font-size: 18.5px; }
    .art-adj { grid-template-columns: 1fr; }
    .art-related-list { grid-template-columns: 1fr; }
    .art-related { padding: 20px; }
    .art-foot-main { grid-template-columns: 1fr; gap: 24px; }
    .art-foot-in { padding: 0 16px; }
}

/* ---------- 顶栏：直接复用首页 .nav，这里只补文章页需要的偏移与常驻白底 ---------- */
.art-body {
    padding-top: 72px;
    background: #f7f9fd;
}

.art-body .nav {
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom-color: var(--line, #e6ebf3);
    box-shadow: 0 10px 30px -24px rgba(23, 58, 140, .32);
}

.art-body .nav.is-stuck { background: rgba(255, 255, 255, .95); }

.art-body .nav-links a.on {
    color: var(--brand, #2e6bff);
    background: rgba(46, 107, 255, .09);
    font-weight: 600;
}

.art-body .art-main { padding: 26px 0 70px; }

@media (max-width: 720px) {
    .art-body { padding-top: 62px; }
}

/* 文章页顶栏链接比首页多两个栏目，收一点间距，保证右侧按钮不被挤压换行 */
.art-body .nav-links { gap: 0; }
.art-body .nav-links a { padding: 8px 11px; font-size: 14px; }
.art-body .nav-cta { flex: none; white-space: nowrap; }
