/* 题单广场 — 对齐 home / gesp 视觉语言 */
:root {
    --col-bg: #f5f7fb;
    --col-surface: #ffffff;
    --col-text: #1f2329;
    --col-text-2: #646a73;
    --col-text-3: #8f959e;
    --col-line: #eef0f3;
    --col-primary: #1677ff;
    --col-primary-soft: #e8f3ff;
    --col-primary-hover: #0f66e0;
    --col-radius: 14px;
    --col-shadow: 0 1px 2px rgba(31, 35, 41, 0.04), 0 12px 28px rgba(31, 35, 41, 0.06);
}

body:has(.collection-wrap) {
    background: var(--col-bg);
}

.collection-wrap {
    min-height: calc(100vh - 120px);
    padding-bottom: 56px;
    background:
        radial-gradient(1100px 280px at 14% -50px, rgba(22, 119, 255, 0.10), transparent 58%),
        radial-gradient(900px 240px at 92% 0, rgba(14, 165, 233, 0.07), transparent 55%),
        var(--col-bg);
}

.collection-page {
    max-width: 1250px;
    margin: 0 auto;
    padding: 28px 16px 56px;
    color: var(--col-text);
    font-family: "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}

/* 轻量页头 banner：氛围图 + 渐变遮罩，不作全屏大 hero */
.collection-masthead {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 40px;
    margin-bottom: 22px;
    padding: 34px 36px;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    background: #071a3a;
    border: 0;
    box-shadow:
        0 1px 2px rgba(7, 26, 58, 0.18),
        0 18px 40px rgba(11, 60, 140, 0.26);
}

.collection-masthead-media {
    position: absolute;
    inset: 0;
    background:
        url("/assets/img/gesp-level-banner.webp") center right / cover no-repeat;
    transform: scale(1.03);
    pointer-events: none;
}

.collection-masthead-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        rgba(4, 18, 48, 0.92) 0%,
        rgba(6, 28, 68, 0.78) 36%,
        rgba(8, 48, 110, 0.42) 62%,
        rgba(10, 70, 150, 0.16) 82%,
        rgba(10, 90, 180, 0.05) 100%);
    pointer-events: none;
}

.collection-masthead-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 640px;
}

.collection-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.78);
}

.collection-heading {
    margin: 0 0 10px;
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #fff;
}

.collection-lead {
    margin: 0;
    max-width: 40em;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
}

.collection-masthead-stat {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    min-width: 112px;
    box-shadow: none;
}

.collection-masthead-stat strong {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.collection-masthead-stat span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.collection-toolbar {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
}

.collection-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(8px);
}

.collection-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    border-radius: 999px;
    color: var(--col-text-2);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.collection-tab:hover {
    color: var(--col-primary);
    background: var(--col-primary-soft);
}

.collection-tab.is-active,
.collection-tab.active {
    color: #fff;
    background: var(--col-primary);
    box-shadow: 0 6px 16px rgba(22, 119, 255, 0.28);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.collection-card {
    --i: 1;
    display: flex;
    flex-direction: column;
    background: var(--col-surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.03),
        0 10px 28px rgba(15, 23, 42, 0.05);
    text-decoration: none !important;
    color: inherit;
    transform: translateY(0);
    transition:
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.22s ease,
        border-color 0.22s ease;
    animation: collection-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(min(var(--i), 12) * 35ms);
}

@keyframes collection-card-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .collection-card {
        animation: none;
    }
    .collection-card:hover .collection-cover-bg {
        transform: none;
    }
}

.collection-card:hover {
    transform: translateY(-4px);
    border-color: rgba(22, 119, 255, 0.22);
    box-shadow:
        0 8px 18px rgba(22, 119, 255, 0.08),
        0 18px 40px rgba(15, 23, 42, 0.08);
}

.collection-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    width: 100%;
    background: #0b1f3a;
    overflow: hidden;
}

.collection-cover-bg {
    position: absolute;
    inset: 0;
    background: #0b1f3a center / cover no-repeat;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}

.collection-card:hover .collection-cover-bg {
    transform: scale(1.06);
}

.collection-cover-mask {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(4, 18, 48, 0.05) 0%, rgba(4, 18, 48, 0.18) 38%, rgba(4, 18, 48, 0.78) 100%);
    transition: background 0.25s ease;
}

.collection-card:hover .collection-cover-mask {
    background:
        linear-gradient(180deg, rgba(4, 18, 48, 0.08) 0%, rgba(4, 18, 48, 0.28) 36%, rgba(4, 18, 48, 0.84) 100%);
}

.collection-card-tag {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
}

.collection-card-title {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.collection-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 13px;
    background: #fff;
    color: var(--col-text-3);
    font-size: 12px;
    line-height: 1.3;
}

.collection-card-meta .meta-left {
    color: var(--col-text-2);
}

.collection-card-meta .meta-left b {
    color: var(--col-primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    margin-right: 2px;
}

.collection-card-meta .meta-mid {
    color: var(--col-text-3);
}

.collection-card-meta .meta-go {
    margin-left: auto;
    color: var(--col-primary);
    font-weight: 500;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.collection-card:hover .meta-go {
    opacity: 1;
    transform: translateX(0);
}

.collection-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px dashed #d7e0ec;
    border-radius: 16px;
}

.collection-empty strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: var(--col-text);
}

.collection-empty p {
    margin: 0;
    color: var(--col-text-3);
    font-size: 14px;
}

.collection-pager {
    margin-top: 28px;
    padding-bottom: 8px;
    text-align: center;
}

.collection-pager .pagination {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.collection-pager .pagination > li {
    display: inline-block;
}

.collection-pager .pagination > li > a,
.collection-pager .pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--col-line);
    background: #fff;
    color: var(--col-text-2);
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 400;
}

.collection-pager .pagination > li > a:hover {
    border-color: rgba(22, 119, 255, 0.35);
    color: var(--col-primary);
    background: var(--col-primary-soft);
}

.collection-pager .pagination > .active > a,
.collection-pager .pagination > .active > span {
    background: var(--col-primary);
    border-color: var(--col-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.25);
}

.collection-pager .pagination > .disabled > a,
.collection-pager .pagination > .disabled > span {
    opacity: 0.45;
    pointer-events: none;
}

/* 题单详情 */
body:has(.collection-detail-wrap) {
    background: var(--col-bg);
}

/* 站点 main.content 默认 overflow:auto 会截断 sticky，必须放开 */
body:has(.collection-detail-wrap) main.content {
    overflow: visible !important;
}

.collection-detail-wrap {
    min-height: calc(100vh - 120px);
    padding-bottom: 64px;
    background:
        radial-gradient(1000px 320px at 8% -40px, rgba(22, 119, 255, 0.11), transparent 60%),
        radial-gradient(780px 260px at 96% 40px, rgba(14, 165, 233, 0.08), transparent 58%),
        var(--col-bg);
}

.collection-detail-page {
    max-width: 1250px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.collection-detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--col-text-3);
}

.collection-detail-breadcrumb a {
    color: var(--col-text-2);
    text-decoration: none !important;
}

.collection-detail-breadcrumb a:hover {
    color: var(--col-primary);
}

.collection-detail-breadcrumb .is-current {
    color: var(--col-text);
}

.collection-detail-hero {
    position: relative;
    display: block;
    margin-bottom: 16px;
    padding: 36px 38px;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    background: #071a3a;
    border: 0;
    box-shadow:
        0 1px 2px rgba(7, 26, 58, 0.18),
        0 18px 40px rgba(11, 60, 140, 0.28);
}

.collection-detail-hero::before {
    display: none;
}

.collection-detail-hero-media {
    position: absolute;
    inset: 0;
    background: center right / cover no-repeat;
    transform: scale(1.03);
    pointer-events: none;
}

.collection-detail-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        rgba(4, 18, 48, 0.92) 0%,
        rgba(6, 28, 68, 0.78) 30%,
        rgba(8, 48, 110, 0.42) 54%,
        rgba(10, 70, 150, 0.16) 76%,
        rgba(10, 90, 180, 0.05) 100%);
    pointer-events: none;
}

.collection-detail-hero-main {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 720px;
}

.collection-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.collection-detail-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 450;
    line-height: 1;
}

.collection-detail-badge.is-official {
    background: #1677ff;
    color: #fff;
    box-shadow: 0 6px 14px rgba(22, 119, 255, 0.28);
}

.collection-detail-badge.is-path {
    background: rgba(8, 145, 178, 0.18);
    color: #9aecd9;
    border: 1px solid rgba(154, 236, 217, 0.28);
}

.collection-detail-badge.is-soft {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.collection-detail-title {
    margin: 0 0 10px;
    font-size: 36px;
    font-weight: 550;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 18px rgba(4, 18, 48, 0.35);
}

.collection-detail-lead {
    margin: 0 0 20px;
    max-width: 560px;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
}

.collection-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.collection-detail-cta,
.collection-detail-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.collection-detail-cta {
    background: var(--col-primary);
    color: #fff !important;
    border: 1px solid transparent;
    box-shadow: 0 8px 18px rgba(22, 119, 255, 0.35);
}

.collection-detail-cta:hover {
    background: var(--col-primary-hover);
    color: #fff !important;
    transform: translateY(-1px);
}

.collection-detail-ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.95) !important;
    cursor: pointer;
}

.collection-detail-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.4);
}

.collection-detail-link {
    margin-left: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none !important;
}

.collection-detail-link:hover {
    color: #fff;
}

.collection-detail-hero-mark {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 28px rgba(4, 18, 48, 0.28);
}

.collection-detail-hero-mark-title {
    max-width: 7em;
    font-size: 18px;
    font-weight: 550;
    color: #fff;
    line-height: 1.25;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-detail-hero-mark-sub {
    margin-top: 6px;
    font-size: 11px;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.55);
}

.collection-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.collection-detail-hero-side,
.collection-detail-cover {
    display: none;
}

.collection-detail-hero-side {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.collection-detail-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 132px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 16px 36px rgba(4, 18, 48, 0.35),
        0 0 0 5px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    transform: rotate(2deg);
}

.collection-detail-cover.is-text {
    gap: 6px;
    padding: 12px;
    text-align: center;
}

.collection-detail-cover-char {
    font-size: 42px;
    font-weight: 550;
    line-height: 1;
    color: #fff;
    letter-spacing: -0.04em;
}

.collection-detail-cover-name {
    max-width: 100%;
    font-size: 13px;
    font-weight: 450;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 简介：左侧目录吸顶跟随滚动（sticky，非整页 fixed） */
.collection-intro-layout {
    display: block;
}

.collection-intro-layout.has-sidenav {
    display: flex;
    align-items: flex-start;
}

.collection-intro-sidenav {
    position: sticky;
    top: 72px;
    flex: 0 0 200px;
    width: 200px;
    align-self: flex-start;
    margin: 0;
    padding: 18px 12px 20px 18px;
    border-right: 1px solid #f0f2f5;
    background: #fafcff;
    box-sizing: border-box;
    max-height: calc(100vh - 88px);
    overflow: auto;
}

.collection-intro-sidenav-head {
    margin: 0 0 12px;
    padding: 0 6px;
}

.collection-intro-sidenav-head strong {
    display: block;
    font-size: 14px;
    font-weight: 550;
    color: var(--col-text);
}

.collection-intro-sidenav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.collection-intro-sidenav-item {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--col-text-2);
    font-size: 13px;
    line-height: 1.45;
    text-decoration: none !important;
    border-left: 2px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.collection-intro-sidenav-item.is-lv4 {
    padding-left: 18px;
    font-size: 12px;
    color: var(--col-text-3);
}

.collection-intro-sidenav-item:hover {
    color: var(--col-primary);
    background: rgba(22, 119, 255, 0.06);
}

.collection-intro-sidenav-item.is-active {
    color: var(--col-primary);
    background: var(--col-primary-soft);
    border-left-color: var(--col-primary);
    font-weight: 500;
}

.collection-intro-heading {
    scroll-margin-top: 88px;
}

.collection-intro-layout.has-sidenav .collection-intro-body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 28px 28px 24px;
}

.collection-detail-metabar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 28px;
    margin: 0 0 16px;
    padding: 14px 22px;
    border-radius: 14px;
    background: linear-gradient(105deg, #0b1f3f 0%, #12325f 55%, #0d284c 100%);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(11, 40, 90, 0.18);
}

.collection-meta-count {
    font-size: 14px;
    font-weight: 450;
    white-space: nowrap;
}

.collection-meta-fav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 450;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
}

.collection-meta-fav:hover,
.collection-meta-fav.is-on {
    color: #ffd666;
}

.collection-meta-fav .fa {
    font-size: 15px;
}

.collection-meta-progress {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    font-size: 14px;
    white-space: nowrap;
}

.collection-meta-bar {
    display: inline-block;
    width: 140px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.collection-meta-bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #69b1ff, #1677ff);
    font-style: normal;
}

.collection-detail-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 88px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(22, 119, 255, 0.08);
}

.collection-detail-stat strong {
    font-size: 20px;
    font-weight: 550;
    color: var(--col-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.collection-detail-stat span {
    margin-top: 2px;
    font-size: 12px;
    color: var(--col-text-3);
}

.collection-section-eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--col-primary);
}

.collection-detail-card {
    background: var(--col-surface);
    border: 1px solid var(--col-line);
    border-radius: 16px;
    box-shadow: var(--col-shadow);
    /* 不可用 overflow:hidden，否则左侧简介导航 sticky 无法跟随页面滚动 */
    overflow: visible;
}

.collection-detail-tabs {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 0 20px;
    border-bottom: 1px solid #f0f2f5;
    background: #fff;
    border-radius: 16px 16px 0 0;
}

.collection-detail-tab {
    position: relative;
    appearance: none;
    border: 0;
    background: transparent;
    margin: 0;
    padding: 16px 14px 14px;
    font-size: 15px;
    font-weight: 400;
    color: #8f959e;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.15s ease;
}

.collection-detail-tab:hover {
    color: #4e5969;
}

.collection-detail-tab.is-active {
    color: #1f2329;
    font-weight: 550;
}

.collection-detail-tab.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #1677ff;
}

.collection-detail-panels {
    background: #fff;
    border-radius: 0 0 16px 16px;
}

.collection-detail-panel {
    display: none;
}

.collection-detail-panel.is-active {
    display: block;
}

.collection-detail-panel[hidden] {
    display: none !important;
}

.collection-intro-body {
    padding: 8px 28px 28px;
    font-size: 15px;
    line-height: 1.85;
    color: #4e5969;
}

.collection-intro-body h2,
.collection-intro-body h3,
.collection-intro-body h4,
.collection-intro-body h5 {
    margin: 1.35em 0 0.55em;
    color: #1f2329;
    font-weight: 550;
    line-height: 1.35;
}

.collection-intro-body h2:first-child,
.collection-intro-body h3:first-child {
    margin-top: 0.55em;
}

.collection-intro-body h2 { font-size: 22px; }
.collection-intro-body h3 { font-size: 18px; }
.collection-intro-body p { margin: 0.75em 0; }
.collection-intro-body ul,
.collection-intro-body ol {
    margin: 0.55em 0 0.95em;
    padding-left: 1.4em;
}
.collection-intro-body li { margin: 0.3em 0; }
.collection-intro-body code {
    padding: 0.12em 0.4em;
    border-radius: 5px;
    background: #f2f4f8;
    color: #cf1322;
    font-size: 0.9em;
}
.collection-intro-body pre.md-code,
.collection-intro-body pre {
    margin: 1em 0;
    padding: 16px 18px;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.65;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.collection-intro-body pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}
.collection-intro-body .katex {
    font-size: 1.05em;
    color: #1f2329;
}
.collection-intro-body .katex-display {
    margin: 0.95em 0;
    overflow-x: auto;
    overflow-y: hidden;
}
.collection-intro-body img {
    display: block;
    max-width: min(100%, 720px);
    height: auto;
    margin: 1em 0;
    border-radius: 12px;
    border: 1px solid #eef0f3;
    background: #f8fafc;
}
.collection-intro-body a {
    color: #1677ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(22, 119, 255, 0.28);
    transition: color 0.15s ease, border-color 0.15s ease;
}
.collection-intro-body a:hover {
    color: #0f66e0;
    border-bottom-color: rgba(15, 102, 224, 0.55);
}
.collection-intro-body blockquote {
    margin: 0.9em 0;
    padding: 10px 16px;
    border-left: 3px solid #91caff;
    background: #f5f9ff;
    color: #4e5969;
    border-radius: 0 10px 10px 0;
}

.collection-problems-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--col-line);
    background: #fafcff;
}

.collection-problems-count {
    font-size: 13px;
    color: var(--col-text-3);
    font-weight: 400;
}

.collection-problems-start {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--col-primary-soft);
    color: var(--col-primary) !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
}

.collection-problems-start:hover {
    background: #d6e9ff;
}

.collection-problem-list {
    display: flex;
    flex-direction: column;
}

.collection-problem-headrow,
.collection-problem-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 104px 84px 72px;
    align-items: center;
    gap: 12px;
    padding: 0 28px;
}

.collection-problem-headrow > :nth-child(1),
.collection-problem-row > :nth-child(1) {
    justify-self: center;
}

.collection-problem-headrow > :nth-child(2),
.collection-problem-row > :nth-child(2) {
    justify-self: stretch;
    min-width: 0;
}

.collection-problem-headrow > :nth-child(3),
.collection-problem-row > :nth-child(3),
.collection-problem-headrow > :nth-child(4),
.collection-problem-row > :nth-child(4) {
    justify-self: stretch;
    text-align: center;
}

.collection-problem-headrow > :nth-child(5),
.collection-problem-row > :nth-child(5) {
    justify-self: end;
    text-align: right;
}

.collection-problem-headrow {
    height: 42px;
    border-bottom: 1px solid var(--col-line);
    background: #f8fafc;
    font-size: 12px;
    font-weight: 450;
    color: var(--col-text-3);
    letter-spacing: 0.02em;
}

.collection-problem-row {
    min-height: 74px;
    padding-top: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--col-line);
    color: inherit;
    text-decoration: none !important;
    transition: background 0.18s ease;
}

.collection-problem-row:last-child {
    border-bottom: none;
}

.collection-problem-row:hover {
    background: linear-gradient(90deg, rgba(232, 243, 255, 0.95), rgba(255, 255, 255, 0.4));
}

.collection-problem-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f3f5f8;
    color: var(--col-text-2);
    font-size: 13px;
    font-weight: 550;
    font-variant-numeric: tabular-nums;
}

.collection-problem-row:hover .collection-problem-index {
    background: #fff;
    color: var(--col-primary);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.16);
}

.collection-problem-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.collection-problem-title {
    display: block;
    font-size: 15px;
    font-weight: 450;
    color: var(--col-text);
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-problem-title em {
    font-style: normal;
}

.collection-problem-source {
    margin-right: 6px;
    color: var(--col-text-3);
    font-weight: 400;
}

.collection-problem-row:hover .collection-problem-title {
    color: var(--col-primary);
}

.collection-problem-row:hover .collection-problem-source {
    color: var(--col-primary);
    opacity: 0.75;
}

.collection-problem-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.collection-problem-tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1;
}

.col-tag-tone-0 { background: #e8f1ff; color: #1677ff; }
.col-tag-tone-1 { background: #ecfdf5; color: #059669; }
.col-tag-tone-2 { background: #fff7ed; color: #c2410c; }
.col-tag-tone-3 { background: #f5f3ff; color: #7c3aed; }
.col-tag-tone-4 { background: #fdf2f8; color: #db2777; }
.col-tag-tone-5 { background: #ecfeff; color: #0891b2; }
.col-tag-tone-6 { background: #fefce8; color: #a16207; }
.col-tag-tone-7 { background: #f1f5f9; color: #475569; }

.collection-problem-diff {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 104px;
    height: 26px;
    margin: 0 auto;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 450;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-diff-none { background: #f3f5f8; color: var(--col-text-3); }
.col-diff-entry { background: #ecfdf5; color: #059669; }
.col-diff-puji { background: #e8f1ff; color: #1677ff; }
.col-diff-puji-tigao { background: #ecfeff; color: #0891b2; }
.col-diff-tigao { background: #fff7ed; color: #c2410c; }
.col-diff-provincial { background: #f5f3ff; color: #7c3aed; }
.col-diff-noi { background: #fef2f2; color: #dc2626; }
.col-diff-other { background: #f1f5f9; color: #475569; }

.collection-problem-rate {
    display: block;
    width: 100%;
    font-size: 13px;
    color: var(--col-text-2);
    font-weight: 450;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.collection-problem-rate.is-empty {
    color: var(--col-text-3);
    font-weight: 400;
}

.collection-problem-go {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 56px;
    font-size: 13px;
    font-weight: 500;
    color: var(--col-primary);
    white-space: nowrap;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.collection-problem-row:hover .collection-problem-go {
    transform: translateX(3px);
}

.collection-detail-empty {
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

@media (max-width: 991px) {
    .collection-masthead {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 28px 24px;
    }

    .collection-masthead-stat {
        align-items: flex-start;
    }

    .collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .collection-detail-hero {
        grid-template-columns: 1fr;
        padding: 28px 24px;
    }

    .collection-detail-hero-side {
        display: none;
    }

    .collection-detail-title {
        font-size: 28px;
    }

    .collection-intro-layout.has-sidenav {
        flex-direction: column;
    }

    .collection-intro-sidenav {
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
        flex: none;
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #f0f2f5;
        padding: 14px 16px 12px;
    }

    .collection-intro-sidenav-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .collection-intro-sidenav-item,
    .collection-intro-sidenav-item.is-lv4 {
        padding: 6px 10px;
        border-left: 0;
        border-radius: 999px;
        border: 1px solid var(--col-line);
        background: #fff;
        font-size: 12px;
    }

    .collection-intro-sidenav-item.is-active {
        border-color: var(--col-primary);
    }

    .collection-intro-body,
    .collection-problems-toolbar,
    .collection-detail-tabs,
    .collection-problem-headrow,
    .collection-problem-row {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 575px) {
    .collection-detail-metabar {
        gap: 12px 16px;
        padding: 12px 16px;
    }

    .collection-meta-progress {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .collection-meta-bar {
        width: 100px;
        flex: 1;
        max-width: 160px;
    }

    .collection-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .collection-heading {
        font-size: 24px;
    }

    .collection-masthead {
        padding: 24px 20px;
        border-radius: 14px;
    }

    .collection-tabs {
        width: 100%;
    }

    .collection-tab {
        flex: 1;
        padding: 0 12px;
        font-size: 13px;
    }

    .collection-cover {
        aspect-ratio: 16 / 9;
    }

    .collection-card:hover .meta-go {
        opacity: 1;
        transform: none;
    }

    .collection-detail-hero {
        padding: 20px;
        border-radius: 14px;
    }

    .collection-detail-title {
        font-size: 24px;
    }

    .collection-detail-stat {
        min-width: 76px;
        padding: 8px 12px;
    }

    .collection-problems-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .collection-problem-headrow {
        display: none;
    }

    .collection-problem-row {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        padding: 14px 16px;
    }

    .collection-problem-diff,
    .collection-problem-rate {
        display: none;
    }
}
