/* BY_QIYE ADD 2026-05-20: portal fallback pages, tuned for SEO article readability and low CLS. */

#nv_portal .bm {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

#nv_portal #pt {
    max-width: 1200px;
    margin: 12px auto 16px;
    padding: 12px 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

#nv_portal #ct {
    margin-top: 24px;
    margin-bottom: 48px;
}

#nv_portal .mn,
#nv_portal .sd {
    min-width: 0;
}

#nv_portal .bm {
    margin-bottom: 18px;
    overflow: hidden;
}

#nv_portal .bm_h {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(59,130,246,0.06), transparent);
}

#nv_portal .bm_h h1,
#nv_portal .bm_h h2,
#nv_portal .bm_h h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.12rem;
    line-height: 1.35;
}

#nv_portal .bm_c {
    padding: 18px;
}

#nv_portal .vw {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 34px;
}

#nv_portal .vw .h {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

#nv_portal .vw .h h1 {
    margin: 0 0 12px;
    color: var(--text-main);
    font-size: 2rem;
    line-height: 1.28;
    letter-spacing: 0;
}

#nv_portal .vw .s,
#nv_portal .vw .o,
#nv_portal .vw .xg1 {
    color: var(--text-muted);
}

#nv_portal .vw .s {
    margin: 18px 0;
    padding: 16px 18px;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
    background: rgba(59,130,246,0.07);
}

#nv_portal .vw .d {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.85;
}

#nv_portal .vw .d img,
#nv_portal .bm_c img,
#nv_portal .xld .m img,
#nv_portal .ml img {
    max-width: 100%;
    height: auto;
}

#nv_portal .xld dl {
    min-height: 116px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

#nv_portal .xld dl:last-child {
    border-bottom: 0;
}

#nv_portal .xld dt {
    margin-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 700;
}

#nv_portal .xld dd {
    color: var(--text-muted);
    line-height: 1.65;
}

#nv_portal .xld .m {
    width: 150px;
    height: 96px;
    margin-right: 16px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-body);
}

#nv_portal .xld .m img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#nv_portal .ml {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

#nv_portal .ml li {
    width: auto !important;
    min-height: 190px;
    padding: 0;
}

#nv_portal .ml .c,
#nv_portal .ml li > a:first-child {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-body);
}

#nv_portal .ml img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* BY_QIYE ADD 2026-05-20: mobile-derived lightweight portal list/article templates. */
#nv_portal .by-portal-list,
#nv_portal .by-portal-view {
    margin-bottom: 48px;
}

#nv_portal .by-portal-head .bm_c {
    padding: 22px;
}

#nv_portal .by-portal-head__main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

#nv_portal .by-portal-head h1 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.65rem;
    line-height: 1.35;
    letter-spacing: 0;
}

#nv_portal .by-portal-head__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

#nv_portal .by-portal-head__actions a,
#nv_portal .by-subnav a,
#nv_portal .by-article-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

#nv_portal .by-portal-head__actions a:hover,
#nv_portal .by-subnav a:hover,
#nv_portal .by-article-actions a:hover {
    color: var(--primary-color);
    border-color: rgba(59,130,246,0.35);
    background: rgba(59,130,246,0.08);
}

#nv_portal .by-subnav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

#nv_portal .by-article-list .bm_c {
    padding: 4px 22px;
}

#nv_portal .by-article-item {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 18px;
    min-height: 126px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

#nv_portal .by-article-item:last-child {
    border-bottom: 0;
}

#nv_portal .by-article-thumb {
    display: block;
    width: 168px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-body);
}

#nv_portal .by-article-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#nv_portal .by-article-body {
    min-width: 0;
}

#nv_portal .by-article-body h2 {
    margin: 0 0 9px;
    font-size: 1.1rem;
    line-height: 1.45;
    letter-spacing: 0;
}

#nv_portal .by-article-summary {
    margin: 0 0 12px;
    color: var(--text-muted);
    line-height: 1.72;
}

#nv_portal .by-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

#nv_portal .by-portal-view {
    max-width: 900px;
}

#nv_portal .by-article-view {
    padding: 36px;
}

#nv_portal .by-article-view .h {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

#nv_portal .by-article-view .h h1 {
    margin: 0 0 13px;
    color: var(--text-main);
    font-size: 2rem;
    line-height: 1.28;
    letter-spacing: 0;
}

#nv_portal .by-article-content {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.86;
}

#nv_portal .by-article-content img,
#nv_portal .by-article-content video,
#nv_portal .by-article-content iframe {
    max-width: 100%;
}

#nv_portal .by-article-content img {
    height: auto;
}

#nv_portal .by-inner-nav,
#nv_portal .by-prev-next {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

#nv_portal .by-inner-nav h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

#nv_portal .by-prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#nv_portal .by-prev-next a {
    min-width: 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-body);
    color: var(--text-main);
}

@media (max-width: 720px) {
    #nv_portal #ct,
    #nv_portal .ct2,
    #nv_portal .ct2_a {
        display: block !important;
    }

    #nv_portal .mn,
    #nv_portal .sd {
        width: 100% !important;
        float: none !important;
        padding: 0 !important;
    }

    #nv_portal .vw {
        padding: 20px;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    #nv_portal .vw .h h1 {
        font-size: 1.5rem;
    }

    #nv_portal .xld .m {
        float: none;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        margin: 0 0 12px;
    }

    #nv_portal .by-portal-head__main,
    #nv_portal .by-article-item,
    #nv_portal .by-prev-next {
        display: block;
    }

    #nv_portal .by-portal-head__actions {
        justify-content: flex-start;
        margin-top: 14px;
    }

    #nv_portal .by-article-thumb {
        width: 100%;
        margin-bottom: 14px;
    }

    #nv_portal .by-article-view {
        padding: 22px 18px;
    }

    #nv_portal .by-article-view .h h1 {
        font-size: 1.5rem;
    }

    #nv_portal .by-prev-next a {
        display: block;
        margin-bottom: 10px;
    }
}
