/* ===== DESIGN.md tokens ================================================
   通用型主题：不绑定单一垂直领域，配色取自根目录 DESIGN.md §2.2 通用主题
   调色板，圆角／字阶／间距仍严格遵循 DESIGN.md，勿新增规范外的值。字体按 DESIGN.md 的四大
   角色（display / serif / sans / mono）承担，全部带系统字体兜底栈。
   ===================================================================== */
.theme-tapstream {
    /* colors */
    --wd-primary: #fafafa;
    --wd-on-primary: #0b0b0c;
    --wd-ink: #fafafa;
    --wd-ink-soft: #d4d4d8;
    --wd-body: #a1a1aa;
    --wd-hairline: #27272a;
    --wd-canvas: #0b0b0c;
    --wd-canvas-soft: #18181b;
    --wd-link: #7dd3fc;
    --wd-footer-bg: #18181b;
    --wd-footer-ink: #fafafa;
    /* spacing — 4px 基数 */
    --wd-xxs: 2px;
    --wd-xs: 4px;
    --wd-sm: 8px;
    --wd-md: 12px;
    --wd-lg: 16px;
    --wd-xl: 20px;
    --wd-2xl: 24px;
    --wd-3xl: 32px;
    --wd-4xl: 48px;
    --wd-5xl: 64px;
    /* rounded — 领域自适应圆角 */
    --wd-radius: 12px;
    --wd-radius-card: 18px;
    --wd-r-full: 9999px;
    /* type roles */
    --wd-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    --wd-serif: Georgia, "Times New Roman", Times, serif;
    --wd-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --wd-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
}

/* ===== 页面底与基础排版 ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

.theme-tapstream {
    margin: 0;
    background: var(--wd-canvas);
    color: var(--wd-ink);
    font-family: var(--wd-sans);
    font-size: 17px;
    line-height: 1.45;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.tf-main {
    min-height: 80vh;
}

/* ===== masthead-band / nav-bar ===== */
.tf-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--wd-canvas) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--wd-hairline);
}

.tf-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wd-lg);
    padding: var(--wd-md) var(--wd-xl);
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.tf-brand {
    font-family: var(--wd-display);
    font-weight: 700;
    color: var(--wd-ink);
    text-decoration: none;
    font-size: 32px;
    line-height: 35.2px;
    letter-spacing: -0.3px;
    display: inline-flex;
    align-items: center;
    gap: var(--wd-sm);
    min-width: 0;
}

.tf-brand:hover {
    opacity: 0.85;
}

.tf-nav {
    display: flex;
    align-items: center;
    gap: var(--wd-xl);
}

.tf-nav a {
    color: var(--wd-ink);
    text-decoration: none;
    font-family: var(--wd-sans);
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: var(--wd-xs) 0;
    transition: color 0.15s ease;
}

.tf-nav a:hover {
    color: var(--wd-link);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.tf-menu-toggle {
    display: none;
    text-decoration: none;
    color: inherit;
}

/* ===== category-eyebrow ===== */
.tf-kicker {
    color: var(--wd-link);
    text-transform: uppercase;
    margin-bottom: var(--wd-sm);
    font-family: var(--wd-mono);
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: 0.4px;
}

/* ===== 广告壳 ======================================================
   1. :has(.ad) —— 只有广告组件真的渲染出内容时才预留高度、加边框与标注，
      没有广告时整块塌陷为 0，不会留下空白带。
   2. 创意区按实际投放尺寸（Fluid / 300x250）预留 250px，素材回填前后
      总高一致，CLS 为 0，同时让广告在首屏稳定可见。
   3. 上下各留 48px，与任何可点击元素保持足够距离，避免误点。
   ================================================================= */
.tf-ad:has(.ad) {
    display: block;
    margin: var(--wd-2xl) 0;
    padding: 0;
    border-top: 1px solid var(--wd-hairline);
    border-bottom: 1px solid var(--wd-hairline);
    text-align: center;
    background: var(--wd-canvas);
    contain: layout;
}

/* 实际投放的四个广告位都是 Fluid / 300x250：按 250px 预留「创意区」高度，
   标注与内边距在壳上自然叠加，回填前后总高一致 —— CLS 为 0，也不会像
   按整壳猜 300px 那样在素材偏矮时留下大片空白。 */
.tf-ad:has(.ad) .ad {
    min-height: 250px;
}


/* 组件自身的居中容器：保证素材在窄屏下满宽不被裁切 */
.tf-ad .ad {
    max-width: 100%;
}

.tf-ad .ad-content {
    min-width: 0;
    overflow-x: auto;
}

/* ===== 通用页头 ===== */
.tf-page-head {
    padding-block: var(--wd-2xl) var(--wd-md);
    margin-bottom: 0;
    border-bottom: 1px solid var(--wd-hairline);
}

.tf-page-head h1 {
    font-family: var(--wd-display);
    font-weight: 700;
    margin: var(--wd-sm) 0;
    overflow-wrap: break-word;
    font-size: 48px;
    line-height: 52.8px;
    letter-spacing: -0.4px;
}

.tf-page-head p {
    color: var(--wd-body);
    margin: 0;
    font-family: var(--wd-serif);
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.09px;
}

.tf-page-head a {
    color: var(--wd-link);
    font-weight: 700;
    text-decoration: underline;
}

/* ===== 全出血流容器 ==================================================
   骨架是「一条不中断的竖幅卷轴」：不设侧栏、不设卡片网格，内容单元只有
   .tf-slab 一种，从首页贯穿到分类页、详情页与索引页。
   .tf-wrap 因此满宽；需要行宽约束的长文与表单单独走 .tf-read。
   ===================================================================== */
.tf-wrap {
    --tf-gut: var(--wd-lg);
    max-width: none;
    margin: 0;
    padding: 0 0 var(--wd-4xl);
}

.tf-wrap > .tf-page-head,
.tf-wrap > .tf-ad,
.tf-wrap > .tf-pager,
.tf-wrap > .tf-rail {
    padding-inline: var(--tf-gut);
}

.tf-read {
    max-width: 680px;
    margin: 0 auto;
    padding-inline: var(--wd-lg);
}

/* ===== 频道条：替代侧栏（仅桌面端）===================================
   移动端一律隐藏：分类已收在汉堡抽屉里，页面上再铺一条就是同一份导航
   出现两次，也退回了被禁的「横向平铺分类」形态（AGENTS.md §3.3）。
   ===================================================================== */
.tf-rail {
    display: flex;
    gap: var(--wd-sm);
    overflow-x: auto;
    padding-block: var(--wd-md);
    scrollbar-width: none;
}

.tf-rail::-webkit-scrollbar { display: none; }

.tf-rail a {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: var(--wd-sm) var(--wd-lg);
    border: 1px solid var(--wd-hairline);
    border-radius: var(--wd-r-full);
    background: var(--wd-canvas-soft);
    color: var(--wd-ink-soft);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--wd-sans);
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.tf-rail a:hover, .tf-rail a.is-current {
    border-color: var(--wd-primary);
    color: var(--wd-ink);
}

.tf-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--wd-4xl) var(--wd-lg);
    color: var(--wd-body);
    font-family: var(--wd-serif);
    font-size: 16px;
    line-height: 24px;
}

.tf-pager {
    margin-top: var(--wd-3xl);
    padding-top: var(--wd-2xl);
    border-top: 1px solid var(--wd-hairline);
}

.tf-pager nav {
    display: flex;
    justify-content: center;
    gap: var(--wd-sm);
    flex-wrap: wrap;
}

/* ===== 长文型页面（about / contact） ===== */
.tf-prose-wrap {
    max-width: 760px;
    margin: auto;
}

.tf-panel {
    background: var(--wd-canvas);
    border-radius: var(--wd-radius);
}

.tf-panel h2 {
    font-family: var(--wd-display);
    font-weight: 700;
    margin: var(--wd-3xl) 0 var(--wd-md);
    font-size: 26px;
    line-height: 30px;
}

.tf-panel h2:first-child {
    margin-top: 0;
}

.tf-panel p {
    color: var(--wd-ink);
    margin: 0 0 var(--wd-lg);
    font-family: var(--wd-serif);
    font-size: 19px;
    line-height: 31.35px;
    letter-spacing: 0.108px;
}

.tf-source-list {
    list-style: none;
    padding: 0;
    margin: var(--wd-lg) 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0;
}

.tf-source-list li {
    padding: var(--wd-md) 0;
    border-bottom: 1px solid var(--wd-hairline);
    color: var(--wd-body);
    font-family: var(--wd-mono);
    font-size: 13px;
    line-height: 18px;
    letter-spacing: 0.4px;
    overflow-wrap: anywhere;
}

.tf-flash {
    padding: var(--wd-md) var(--wd-lg);
    margin-bottom: var(--wd-2xl);
    border: 1px solid var(--wd-primary);
    border-radius: var(--wd-radius);
    color: var(--wd-ink);
    font-family: var(--wd-sans);
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0.4px;
}

/* ===== 表单：触控高度 >= 44px ===== */
.tf-form {
    display: flex;
    flex-direction: column;
    gap: var(--wd-2xl);
}

.tf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--wd-2xl);
}

.tf-form label {
    display: flex;
    flex-direction: column;
    gap: var(--wd-sm);
}

.tf-form span {
    color: var(--wd-ink);
    text-transform: uppercase;
    font-family: var(--wd-mono);
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: 0.4px;
}

.tf-form input, .tf-form textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--wd-canvas-soft);
    color: var(--wd-ink);
    border: 1px solid var(--wd-hairline);
    border-radius: var(--wd-radius);
    padding: var(--wd-md) var(--wd-lg);
    min-height: 44px;
    font-family: var(--wd-sans);
    font-size: 17px;
    line-height: 20px;
}

.tf-form input:focus, .tf-form textarea:focus {
    outline: 2px solid var(--wd-primary);
    outline-offset: 1px;
}

.tf-form button {
    align-self: flex-start;
    background: var(--wd-primary);
    color: var(--wd-on-primary);
    border: none;
    border-radius: var(--wd-radius);
    padding: 10px var(--wd-2xl);
    cursor: pointer;
    font-family: var(--wd-sans);
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0.3px;
    min-height: 44px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.tf-form button:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* ===== footer ===== */
.tf-footer {
    background: var(--wd-footer-bg);
    color: var(--wd-footer-ink);
    padding: var(--wd-4xl) var(--wd-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--wd-2xl);
    font-family: var(--wd-sans);
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0.4px;
}

.tf-footer nav {
    display: flex;
    gap: var(--wd-2xl);
}

.tf-footer a {
    color: var(--wd-footer-ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.tf-footer a:hover {
    text-decoration: underline;
}

/* ===== 合规页（privacy / terms） ===== */
.tf-breadcrumb {
    color: var(--wd-body);
    margin-bottom: var(--wd-2xl);
    font-family: var(--wd-sans);
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0.4px;
}

.tf-breadcrumb a {
    color: var(--wd-body);
    text-decoration: none;
    display: inline-block;
    padding: var(--wd-sm) 0;
}

.tf-breadcrumb a:hover {
    color: var(--wd-link);
    text-decoration: underline;
}

.tf-breadcrumb .is-current {
    color: var(--wd-ink);
}

.tf-legal {
    max-width: 760px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tf-legal h1 {
    font-family: var(--wd-display);
    font-weight: 700;
    margin: 0 0 var(--wd-2xl);
    padding-bottom: var(--wd-lg);
    border-bottom: 2px solid var(--wd-primary);
    font-size: 48px;
    line-height: 52.8px;
    letter-spacing: -0.4px;
}

.tf-legal h2 {
    font-family: var(--wd-display);
    font-weight: 700;
    margin: var(--wd-4xl) 0 var(--wd-lg);
    font-size: 26px;
    line-height: 30px;
}

.tf-legal h3 {
    font-family: var(--wd-sans);
    font-weight: 700;
    margin: var(--wd-3xl) 0 var(--wd-md);
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.28px;
}

.tf-legal h4 {
    font-family: var(--wd-sans);
    font-weight: 700;
    margin: var(--wd-2xl) 0 var(--wd-sm);
    font-size: 17px;
    line-height: 22px;
    letter-spacing: -0.144px;
}

.tf-legal p {
    color: var(--wd-ink);
    margin: var(--wd-lg) 0;
    font-family: var(--wd-serif);
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.09px;
}

.tf-legal p.is-strong {
    font-weight: 700;
}

.tf-legal a {
    color: var(--wd-link);
    text-decoration: underline;
}

.tf-legal ul {
    margin: var(--wd-lg) 0;
    padding-left: var(--wd-xl);
    font-family: var(--wd-serif);
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.09px;
}

.tf-legal li {
    margin: var(--wd-sm) 0;
}

.tf-legal-updated {
    margin-top: var(--wd-4xl);
    padding-top: var(--wd-2xl);
    border-top: 1px solid var(--wd-hairline);
}

.tf-legal-updated p {
    color: var(--wd-body);
    font-family: var(--wd-mono);
    font-size: 13px;
    line-height: 18px;
    letter-spacing: 0.4px;
}

/* ===== 通用响应式 ===== */
@media (max-width: 1023px) {
    .tf-with-side {
        grid-template-columns: minmax(0, 1fr);
    }
    .tf-page-head h1 {
        font-size: 36px;
        line-height: 40px;
        letter-spacing: -0.3px;
    }
    .tf-legal h1 {
        font-size: 36px;
        line-height: 40px;
        letter-spacing: -0.3px;
    }
}

@media (max-width: 767px) {
    .tf-wrap {
        padding: var(--wd-2xl) var(--wd-lg) var(--wd-3xl);
    }
    .tf-form-row {
        grid-template-columns: 1fr;
    }
    .tf-page-head h1, .tf-legal h1 {
        font-size: 28px;
        line-height: 32px;
        letter-spacing: 0;
    }
    .tf-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        cursor: pointer;
        font-family: var(--wd-sans);
        font-size: 22px;
        line-height: 24px;
        color: var(--wd-ink);
        user-select: none;
    }
    .tf-nav {
        display: none;
        flex-direction: column;
        gap: var(--wd-xs);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--wd-canvas);
        border-bottom: 1px solid var(--wd-primary);
        padding: var(--wd-md) var(--wd-xl);
        z-index: 50;
    }
    .tf-nav a {
        display: flex;
        align-items: center;
        min-height: 44px;
        font-size: 15px;
        border-bottom: 1px solid var(--wd-hairline);
    }
    .tf-nav a:last-child {
        border-bottom: none;
    }
    .tf-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--wd-xl);
    }
    .tf-footer nav {
        flex-wrap: wrap;
        gap: var(--wd-lg);
    }
    .tf-brand {
        font-size: 24px;
        line-height: 28px;
    }
    /* 移动端广告：撑到容器满宽（抵消 16px 侧边距），创意区高度同样按 250px 预留 */
    .tf-ad:has(.ad) {
        margin: var(--wd-3xl) calc(var(--wd-lg) * -1);
        padding: var(--wd-md) var(--wd-xs) var(--wd-xl);
    }
}

/* ===== 骨架：满幅覆字卷轴（移动优先）=============================
   移动端是一条 edge-to-edge 的竖向卷轴：每条资讯是一张 4:5 竖图，
   标题压在图上的渐变蒙版里，拇指区一屏一条，滚动成本最低；
   桌面端才升级成两列。没有侧栏、没有网格卡片框。
   ================================================================= */
.tf-stream {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--wd-lg);
}

.tf-slab {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--wd-radius-card);
    background: var(--wd-canvas-soft);
    color: var(--wd-ink);
    text-decoration: none;
    aspect-ratio: 4/5;
    isolation: isolate;
}

.tf-slab img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.tf-slab:hover img {
    transform: scale(1.03);
}

/* 渐变蒙版：保证覆字在任何图片上都达到 WCAG AA 对比度 */
.tf-slab-cap {
    position: absolute;
    inset: auto 0 0 0;
    padding: var(--wd-4xl) var(--wd-xl) var(--wd-xl);
    background: linear-gradient(to top, rgba(11, 11, 12, 0.94) 0%, rgba(11, 11, 12, 0.78) 45%, rgba(11, 11, 12, 0) 100%);
}

.tf-slab-cap .tf-kicker {
    color: #7dd3fc;
    margin-bottom: var(--wd-xs);
}

.tf-slab h2 {
    color: #fafafa;
    font-family: var(--wd-display);
    font-weight: 700;
    margin: 0;
    font-size: 24px;
    line-height: 30px;
    letter-spacing: -0.2px;
    overflow-wrap: break-word;
}

.tf-slab:hover h2 {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tf-slab p {
    color: #d4d4d8;
    margin: var(--wd-sm) 0 0;
    font-family: var(--wd-serif);
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.09px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 头条：更高的画幅，仍在同一条卷轴上 */
.tf-slab-lead {
    aspect-ratio: 3/4;
}

.tf-slab-lead h2 {
    font-size: 32px;
    line-height: 38px;
    letter-spacing: -0.3px;
}

.tf-slab-lead p {
    -webkit-line-clamp: 3;
}

/* 桌面端：竖幅语言不变，但尺寸必须收住。
   验收口径是「home_banner1 广告壳之下的那一屏露出 ≥5 条」（AGENTS.md §4.5），
   banner1 连同边距要吃掉约 400px，所以宽屏靠加列数利用空间，
   不靠放大单块；头条也不再跨全宽。 */
/* 桌面端：竖幅语言不变，但尺寸必须收住。
   验收口径是从 home_banner1 广告壳底边往下量一屏（AGENTS.md §4.5）。
   首段固定 4 条（banner2 按契约排在第 3~4 篇后），4 条在 3 栏里要排齐，
   唯一整齐的分法是「头条通栏 + 3 条各占一列」——
   头条若只跨 2 列，第三列会空出一大块。 */
@media (min-width: 768px) {
    /* 全出血是移动端「拇指流」的骨架前提；桌面端无限拉伸只会让
       行宽失控、图片被撑糊，所以从这里开始收进最大宽度并居中。 */
    .tf-wrap {
        max-width: 1280px;
        margin-inline: auto;
        /* 与 .tf-stream 的 padding-inline 对齐，否则广告壳会比卷轴宽一圈 */
        --tf-gut: var(--wd-xl);
    }
    .tf-detail {
        max-width: 1280px;
        margin-inline: auto;
    }
    .tf-stream {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--wd-lg);
        background: none;
        padding-inline: var(--wd-xl);
        margin-top: var(--wd-lg);
    }
    .tf-slab {
        aspect-ratio: 4/3;
    }
    .tf-slab h2 {
        font-size: 18px;
        line-height: 24px;
        letter-spacing: -0.1px;
    }
    .tf-slab p {
        display: none;
    }
    .tf-slab-cap {
        padding: var(--wd-2xl) var(--wd-md) var(--wd-md);
    }
    /* 头条通栏：24/9 的宽幅，高度压在 520px 内，
       这样「头条 + 一整行」合起来仍在广告之下的一屏里 */
    .tf-slab-lead {
        grid-column: 1 / -1;
        aspect-ratio: 24/9;
    }
    .tf-slab-lead h2 {
        font-size: 30px;
        line-height: 36px;
        letter-spacing: -0.3px;
    }
    .tf-slab-lead p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
    }
    .tf-slab-lead .tf-slab-cap {
        padding: var(--wd-3xl) var(--wd-xl) var(--wd-lg);
    }
}

@media (min-width: 1024px) {
    .tf-wrap {
        --tf-gut: var(--wd-3xl);
    }
    .tf-stream {
        padding-inline: var(--wd-3xl);
    }
    .tf-slab h2 {
        font-size: 19px;
        line-height: 25px;
    }
    .tf-slab-lead h2 {
        font-size: 34px;
        line-height: 40px;
    }
}

@media (min-width: 1600px) {
    /* 超宽屏加一列吸收宽度，单块不继续放大 */
    .tf-stream {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .tf-slab-lead {
        aspect-ratio: 32/9;
    }
}

@media (max-width: 767px) {
    /* wrap 已满幅，卷轴天然 edge-to-edge，1px 发丝线即分隔 */
    .tf-stream {
        gap: 1px;
    }
    .tf-slab {
        border-radius: 0;
        /* 头条之外的条目收成 16/9：4:5 竖幅一屏只装得下两条 */
        aspect-ratio: 16/9;
    }
    .tf-slab-lead {
        aspect-ratio: 4/5;
    }
    .tf-slab-cap {
        padding: var(--wd-2xl) var(--wd-lg) var(--wd-md);
    }
    .tf-slab h2 {
        font-size: 19px;
        line-height: 25px;
    }
    .tf-slab p {
        display: none;
    }
    .tf-slab-lead p {
        display: -webkit-box;
    }
    /* 分类已在汉堡抽屉内，页面上不再重复展示 */
    .tf-rail {
        display: none;
    }
}


/* ===== 无图竖幅：频道索引用 ==========================================
   频道卡没有配图，不该按图片画幅撑出一大块空白：高度由内容决定，
   只给一个下限保证卡片有分量。
   ===================================================================== */
.tf-slab-plain {
    aspect-ratio: auto;
    min-height: 132px;
    background: var(--wd-canvas-soft);
    display: flex;
    align-items: flex-end;
}

.tf-slab-plain .tf-slab-cap {
    position: static;
    background: none;
    width: 100%;
}

.tf-slab-plain h2 {
    font-size: 20px;
    line-height: 26px;
    letter-spacing: -0.2px;
}

/* 频道描述是这张卡唯一的说明文字，不受列表页「桌面端隐藏摘要」的约束 */
.tf-slab-plain p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 详情页封面 ====================================================
   排在标题之后（面包屑 → article_detail → 标题 → 封面，见 AGENTS.md §4.3
   顺序铁律），画面语言与卷轴上的竖幅同源。
   width 必须显式写死：留 auto 时 aspect-ratio 会在 max-height 生效后
   反推着把宽度一起缩小，封面就铺不满了。
   ===================================================================== */
.tf-detail-cover {
    display: block;
    width: 100%;
    margin: var(--wd-2xl) 0;
    overflow: hidden;
    background: var(--wd-canvas-soft);
    aspect-ratio: 16/9;
}

.tf-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tf-related {
    padding-bottom: var(--wd-4xl);
}

.tf-related h2 {
    font-family: var(--wd-display);
    font-weight: 700;
    margin: var(--wd-3xl) 0 0;
    font-size: 24px;
    line-height: 30px;
    letter-spacing: -0.2px;
}

@media (min-width: 768px) {
    .tf-detail-cover {
        aspect-ratio: 21/9;
        max-height: 56vh;
    }
}

/* 分类页 category_banner2 插在文章列表内部：grid 布局下必须跨满整行，
   否则广告会被当成一张卡片挤进某一列（AGENTS.md §4.2）。 */
.cat-ad-row {
    grid-column: 1 / -1;
    width: 100%;
}
