/**
 * 低代码 AI 对比页 · 五页统一壳层样式
 * cod-ai / cont-ai / con2-ai / con3-ai / con5-ai
 * v=20260813 — 二级导航与正文 shell 对齐
 */
@import url('page-shell-unified.css?v=20260720');

:root {
    --ai-header-h: 55px;
    --ai-page-offset: 141px;
    --ai-shell-max: 1440px;
}

body.ai-compare-page {
    padding-top: var(--ai-page-offset, 141px);
}

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 固定层：二级导航 + 章节目录（桌面端并成一行） */
.ai-fixed-stack {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--ai-header-h, 55px);
    z-index: 48;
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
}

.ai-subnav {
    position: relative;
    background: linear-gradient(90deg, #1456F0, #3370FF);
    box-shadow: none;
}

.ai-subnav-inner {
    max-width: var(--ai-shell-max, 1440px);
    margin-left: auto;
    margin-right: auto;
    display: none;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.1rem;
    padding: 0.32rem var(--shell-gutter, 20px);
    overflow-x: auto;
    scrollbar-width: none;
    box-sizing: border-box;
}

.ai-subnav-inner::-webkit-scrollbar {
    display: none;
}

.ai-subnav-link {
    flex-shrink: 0;
    padding: 0.28rem 0.55rem;
    border-radius: 0.45rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.ai-subnav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.ai-subnav-link.is-active {
    background: rgba(255, 255, 255, 0.24);
    font-weight: 600;
}

.ai-subnav-mobile {
    display: block;
    padding: 0.4rem 1rem;
    max-width: var(--ai-shell-max);
    margin: 0 auto;
}

.ai-subnav-select {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 16px;
}

.ai-subnav-select option {
    color: #111;
}

@media (min-width: 768px) {
    .ai-subnav-inner {
        display: flex;
    }

    .ai-subnav-mobile {
        display: none;
    }
}

/* 章节目录（固定顶栏下；桌面与二级导航同行） */
.toc-bar--pinned {
    position: relative;
    top: auto;
    z-index: 1;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid #e8edf3;
    border-bottom: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
    padding: 0;
    overflow: hidden;
    min-width: 0;
}

.toc-bar-inner {
    max-width: var(--ai-shell-max, 1440px);
    margin-left: auto;
    margin-right: auto;
    padding: 6px var(--shell-gutter, 20px);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    scroll-padding-inline: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box;
}

@media (min-width: 900px) {
    body.ai-compare-page .ai-fixed-stack {
        display: flex;
        align-items: stretch;
        background: linear-gradient(90deg, #1456F0 0%, #3370FF 42%, #0f766e 100%);
        /* 与 .container（1440px + gutter）左缘对齐 */
        padding-left: max(var(--shell-gutter, 20px), calc((100vw - var(--ai-shell-max, 1440px)) / 2 + var(--shell-gutter, 20px)));
        padding-right: max(var(--shell-gutter, 20px), calc((100vw - var(--ai-shell-max, 1440px)) / 2 + var(--shell-gutter, 20px)));
        box-sizing: border-box;
    }
    .ai-subnav {
        flex: 1 1 52%;
        min-width: 0;
        background: transparent;
    }
    .ai-subnav-inner {
        max-width: none;
        margin: 0;
        padding-left: 0;
        padding-right: 0.35rem;
    }
    .toc-bar--pinned {
        flex: 1 1 48%;
        background: rgba(255, 255, 255, 0.1);
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.28);
    }
    .toc-bar-inner {
        max-width: none;
        margin: 0;
        padding: 0.32rem 0 0.32rem 0.65rem;
    }
    .toc-label {
        color: #EFF4FF;
        border-right-color: rgba(255, 255, 255, 0.28);
    }
    .toc-chip {
        background: rgba(255, 255, 255, 0.12);
        color: #F6F6FB;
        border: 1px solid rgba(255, 255, 255, 0.18);
    }
    .toc-chip:hover,
    .toc-chip.active {
        background: #fff;
        color: #1D4ED8;
        border-color: #fff;
    }
}

.toc-bar-inner::-webkit-scrollbar {
    display: none;
}

.toc-label {
    font-size: 12px;
    font-weight: 700;
    color: #1D4ED8;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-right: 8px;
    border-right: 1px solid #DEE0E3;
    margin-right: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.toc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    background: #F2F3F5;
    color: #374151;
    border-radius: 14px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.toc-chip:hover,
.toc-chip.active {
    background: #3370FF;
    color: #fff;
}

.toc-chip .num {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    color: #1456F0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.toc-chip:hover .num,
.toc-chip.active .num {
    background: #fff;
    color: #1456F0;
}

@media (max-width: 768px) {
    .toc-bar-inner {
        padding: 8px 12px;
    }

    .toc-chip {
        font-size: 11.5px;
        padding: 5px 10px;
    }
}

/* Hero 轮播 */
.hero.hero--carousel {
    background: #1F2329;
    padding: 0 !important;
    margin-bottom: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero.hero--carousel::before,
.hero.hero--carousel::after {
    display: none;
}

.hero-carousel-stage {
    position: relative;
    min-height: 200px;
}

.hero--carousel .hero-slider {
    position: relative;
    min-height: 200px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    padding: 22px 40px 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s;
    pointer-events: none;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, transparent 28%),
        linear-gradient(105deg, rgba(6, 78, 59, 0.88) 0%, rgba(15, 118, 110, 0.76) 40%, rgba(15, 23, 42, 0.42) 72%, rgba(15, 23, 42, 0.28) 100%);
}

.hero-slide .hero-slide-inner {
    position: relative;
    z-index: 1;
}

.hero--carousel .hero-slide h1,
.hero--carousel .hero-slide-title {
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    font-weight: 800;
    color: #F6F6FB;
    margin-bottom: 6px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.hero--carousel .hero-slide p {
    font-size: 0.875rem;
    color: rgba(248, 250, 252, 0.92);
    max-width: 680px;
    margin: 0 auto 10px;
    line-height: 1.55;
}

.hero--carousel .hero-slide p strong {
    color: #B8CCFF;
}

.hero-accent {
    background: linear-gradient(135deg, #8FB0FF, #B8CCFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.hero-tag-wrap {
    text-align: center;
    margin-bottom: 8px;
}

.hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #EFF4FF;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.hero-tag i {
    color: #B8CCFF;
    margin-right: 4px;
}

.hero--carousel .hero-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #EFF4FF;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero--carousel .hero-button.secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.hero-slide--main {
    background-image: url('../images/1/pexels-sora-shimazaki-5926382.jpg');
}

.hero-slide--dim {
    background-image: url('../images/1/pexels-anete-lusina-5240548.jpg');
}

.hero-slide--dir {
    background-image: url('../images/1/pexels-cottonbro-4705628.jpg');
}

.hero-slide--cta {
    background-image: url('../images/1/pexels-tima-miroshnichenko-6755089.jpg');
}

.hero-carousel-stage .hero-nav {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 8;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #1456F0;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(51, 112, 255, 0.18);
}

.hero-carousel-stage .hero-nav:hover {
    border-color: #3370FF;
    box-shadow: 0 4px 14px rgba(51, 112, 255, 0.2);
}

.hero-nav--prev {
    left: 10px;
}

.hero-nav--next {
    right: 10px;
}

.hero-carousel-ui {
    position: relative;
    z-index: 6;
    padding-bottom: 4px;
}

.hero-slide-counter {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(236, 253, 245, 0.85);
    margin-bottom: 2px;
}

.hero-dots {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 6px 0 4px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: rgba(51, 112, 255, 0.35);
    cursor: pointer;
    transition: width 0.25s, background 0.25s;
}

.hero-dot.is-active {
    width: 24px;
    background: #3370FF;
}

.hero-foot {
    position: relative;
    z-index: 3;
    padding: 12px 0 14px;
    background: #F6F6FB;
    border-bottom: 1px solid #eef2f7;
}

.hero-foot .container {
    max-width: var(--ai-shell-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* AI 方向卡片 */
.ai-cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.ai-card {
    background: #ffffff;
    border: 1px solid #DEE0E3;
    padding: 12px 12px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    display: block;
}

.ai-card:hover {
    border-color: #3370FF;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(51, 112, 255, 0.12);
}

.ai-card .card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    margin-bottom: 6px;
}

.ai-card h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1D2129;
    margin-bottom: 2px;
}

.ai-card p {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

.ai-card .card-badge {
    display: inline-block;
    background: #F0F5FF;
    color: #1456F0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 8px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hero-foot .hero-buttons {
    margin-top: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.25s ease;
    text-decoration: none;
    gap: 5px;
}

.hero-button.primary {
    background: linear-gradient(135deg, #1456F0 0%, #3370FF 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(51, 112, 255, 0.2);
}

.hero-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(51, 112, 255, 0.35);
    color: #fff;
}

.hero-button.secondary {
    background: #ffffff;
    color: #1D4ED8;
    border: 1px solid #B8CCFF;
}

.hero-button.secondary:hover {
    background: #F0F5FF;
    transform: translateY(-2px);
    color: #1D4ED8;
}

.hero-button.green {
    background: linear-gradient(135deg, #3370FF 0%, #3370FF 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 180, 42, 0.2);
}

.hero-button.green:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 180, 42, 0.35);
    color: #fff;
}

@media (max-width: 1024px) {
    .ai-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-carousel-stage,
    .hero--carousel .hero-slider {
        min-height: 180px;
    }

    .hero-slide {
        padding: 16px 14px 4px;
    }

    .hero--carousel .hero-slide h1,
    .hero--carousel .hero-slide-title {
        font-size: 1.1rem;
    }

    .ai-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .hero-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-carousel-stage .hero-nav {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .ai-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
}

/* 配对引流条 + 延伸阅读（与 lc-compare-common 对齐） */
.lc-pair-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    max-width: var(--ai-shell-max, 1440px);
    margin: 16px auto 20px;
    padding: 0 16px;
}

.lc-pair-bar__item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #DEE0E3;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.lc-pair-bar__item:hover {
    border-color: rgba(51, 112, 255, 0.4);
    box-shadow: 0 6px 20px rgba(51, 112, 255, 0.1);
    transform: translateY(-1px);
}

.lc-pair-bar__item--ai {
    background: linear-gradient(135deg, #F0F5FF, #EFF4FF);
    border-color: #B8CCFF;
}

.lc-pair-bar__item--calc {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border-color: #bfdbfe;
}

.lc-pair-bar__item--compare {
    background: linear-gradient(135deg, #faf5ff, #f5f3ff);
    border-color: #ddd6fe;
}

.lc-pair-bar__label {
    grid-column: 1;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.lc-pair-bar__item strong {
    grid-column: 1;
    font-size: 0.9rem;
    color: #1D4ED8;
    font-weight: 700;
}

.lc-pair-bar__item--calc strong { color: #1d4ed8; }
.lc-pair-bar__item--compare strong { color: #6d28d9; }

.lc-pair-bar__desc {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.45;
}

.lc-pair-bar__arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: #94a3b8;
    font-size: 1.1rem;
}

.lc-crosslinks {
    max-width: var(--ai-shell-max, 1440px);
    margin: 2rem auto 1.5rem;
    padding: 1.25rem 1.375rem;
    background: #F6F6FB;
    border: 1px solid #DEE0E3;
    border-radius: 14px;
}

.lc-crosslinks h2 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1D2129;
    margin: 0 0 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lc-crosslinks h2 i { color: #3370FF; }

.lc-crosslinks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.lc-crosslink-card {
    display: block;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #DEE0E3;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lc-crosslink-card:hover {
    border-color: rgba(51, 112, 255, 0.35);
    box-shadow: 0 4px 14px rgba(51, 112, 255, 0.08);
}

.lc-crosslink-card strong {
    display: block;
    font-size: 0.875rem;
    color: #1D4ED8;
    margin-bottom: 4px;
}

.lc-crosslink-card span {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .lc-pair-bar { grid-template-columns: 1fr; }
    .lc-crosslinks-grid { grid-template-columns: 1fr; }
}

/* 摘要条 / 双轨条与 shell 对齐（修复 960px 窄条与 1440px 正文错位） */
body.ai-compare-page .organic-snippet-wrap {
    max-width: var(--ai-shell-max, 1440px);
    margin: 0 auto;
    padding: 8px var(--shell-gutter, 20px) 0;
    box-sizing: border-box;
}

body.ai-compare-page .organic-snippet-wrap .organic-snippet {
    max-width: none;
    margin: 0;
    padding: 0.55rem 0.85rem;
}

/* cod-ai：首屏更紧凑，摘要不占轮播上方 */
body.cod-ai-page .organic-snippet-wrap--top {
    display: none;
}
body.cod-ai-page .organic-snippet-wrap--after-hero {
    padding-top: 0;
    padding-bottom: 4px;
    margin-bottom: 0;
    background: #F6F6FB;
}
body.cod-ai-page .organic-snippet-wrap--after-hero .organic-snippet {
    border-radius: 8px;
    font-size: 0.8rem;
}
body.cod-ai-page .section-block {
    padding: 28px 0 !important;
}
body.cod-ai-page .hero-foot .hero-buttons[style] {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    max-width: 640px !important;
}
body.cod-ai-page .lc-pair-bar {
    margin: 8px auto 10px;
    gap: 8px;
}
body.cod-ai-page .lc-pair-bar__item {
    padding: 10px 12px;
}
body.cod-ai-page .ai-fusion-rail-shell {
    margin-bottom: 0.75rem;
}
body.cod-ai-page .section-block .sub {
    margin-bottom: 1.1rem !important;
}
body.cod-ai-page .dim-card {
    padding: 16px !important;
}
body.cod-ai-page .dim-grid {
    gap: 12px !important;
}

body.ai-compare-page .entry-next-path {
    max-width: var(--ai-shell-max, 1440px);
    margin: 0 auto 12px;
    padding: 0 var(--shell-gutter, 20px);
    box-sizing: border-box;
}

body.ai-compare-page .ai-fusion-rail-shell {
    max-width: var(--ai-shell-max, 1440px);
    margin: 0 auto 1.25rem;
    padding: 0 var(--shell-gutter, 20px);
    box-sizing: border-box;
}
