/* card-catalog · 卡片目录柜 —— 每篇文章是一张打字机目录卡：红色标题线、浅蓝横格、底部穿杆孔 */
:root {
    --ix-cabinet: #d3dae1;
    --ix-steel: #34414e;
    --ix-card: #ffffff;
    --ix-ink: #1c2530;
    --ix-soft: #4b5664;
    --ix-red: #b3261e;
    --ix-ruling: #c5d7ea;
    --ix-display: "Special Elite", "Courier New", monospace;
    --ix-body: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
    --pagination-accent: #22427a;
}

.ix-k0 { --ix-k: #0f6b6b; }
.ix-k1 { --ix-k: #6d2f73; }
.ix-k2 { --ix-k: #22427a; }
.ix-k3 { --ix-k: #55621a; }
.ix-k4 { --ix-k: #9a3f12; }

body.theme-catalog { margin: 0; color: var(--ix-ink); font-family: var(--ix-body); font-size: 16px; line-height: 1.6; background: var(--ix-cabinet); }
:where(.theme-catalog) a { color: inherit; text-decoration: none; }
.theme-catalog :focus-visible { outline: 3px solid #22427a; outline-offset: 3px; }
.ix-skip { position: absolute; left: -9999px; }
.ix-skip:focus { left: 12px; top: 12px; z-index: 50; padding: 10px 14px; background: #fff; font-weight: 600; }
.ix-drawer { display: block; min-height: 60vh; padding-bottom: 40px; }
.ix-drawer:focus { outline: none; }

/* ---------- 母题：目录卡、打字字段、穿杆孔、标签框 ---------- */
.ix-key { font-family: var(--ix-body); font-weight: 600; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ix-soft); }
.ix-subject { display: block; min-width: 0; font-family: var(--ix-display); font-size: .95rem; color: var(--ix-k, #22427a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-filed { display: block; font-family: var(--ix-display); font-size: .9rem; color: var(--ix-soft); white-space: nowrap; }
.ix-hole { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--ix-cabinet); box-shadow: inset 0 2px 3px rgba(28, 37, 48, .35); }
.ix-holder { color: var(--ix-ink); display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; padding: 6px 12px; background: var(--ix-card); border: 3px solid #9aa6b2; box-shadow: inset 0 0 0 1px #e6ebf0; }
.ix-holder-rivet { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #9aa6b2; }
.ix-holder-name { min-width: 0; font-family: var(--ix-display); font-size: 1.15rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-pull { display: block; width: 84px; height: 16px; border: 3px solid #9aa6b2; border-top: 0; border-radius: 0 0 14px 14px; }
.ix-guide-head { display: flex; margin: 44px 0 18px; font-family: var(--ix-display); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.ix-guide-head span { min-width: 0; padding: 8px 20px 6px; background: var(--ix-card); border-radius: 10px 10px 0 0; box-shadow: 0 3px 0 var(--ix-red); }

/* ---------- 顶栏：抽屉面板 ---------- */
.ix-header { background: var(--ix-steel); border-bottom: 4px solid #232d37; }
.ix-header-plate { display: flex; align-items: center; gap: 24px; max-width: 1320px; min-height: 60px; margin: 0 auto; padding: 6px 24px; }
.ix-header .ix-holder { flex: 0 1 auto; margin-right: auto; padding: 5px 14px; }
.ix-header .ix-holder-name { font-size: 1.45rem; }
.ix-index { display: flex; gap: 4px; }
.ix-index a { padding: 6px 14px; font-weight: 600; color: #dfe5eb; border-radius: 8px 8px 0 0; }
.ix-index a:hover { color: #fff; }
.ix-index a.is-open { color: var(--ix-ink); background: var(--ix-card); box-shadow: inset 0 3px 0 var(--ix-red); }
.ix-menu-toggle { display: none; }

/* ---------- 版心 ---------- */
.ix-wrap { max-width: 1320px; margin: 0 auto; padding: 24px 24px 0; }
.ix-wrap-cat { max-width: 1000px; }
.ix-path { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; font-size: .92rem; color: var(--ix-soft); }
.ix-path a { color: #22427a; font-weight: 600; }
.ix-heading { margin: 4px 0 24px; font-family: var(--ix-display); font-weight: 400; font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.15; }
.ix-none { margin: 32px 0; padding: 24px; background: #fff; text-align: center; list-style: none; }
.ix-pager { margin-top: 32px; }

/* ---------- 目录卡 ---------- */
.ix-row { display: grid; gap: 28px 24px; }
.ix-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; }
.ix-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ix-card { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ix-card-link { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; justify-items: stretch; background: var(--ix-card); box-shadow: 0 2px 0 #b5c0ca, 0 4px 8px rgba(28, 37, 48, .12); }
.ix-card-link img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ix-ruling); }
.ix-card-body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 8px; padding: 12px 16px 6px; border-top: 3px solid var(--ix-red); background: repeating-linear-gradient(to bottom, transparent 0 27px, var(--ix-ruling) 27px 28px); }
.ix-card-title { font-family: var(--ix-display); font-size: 1.2rem; line-height: 1.35; }
.ix-card-link:hover .ix-card-title { text-decoration: underline; }
.ix-card-link > .ix-hole { justify-self: center; margin: 4px 0 12px; }

/* ---------- 首页头条：主款目卡 ---------- */
.ix-entry { min-width: 0; }
.ix-entry-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); background: var(--ix-card); box-shadow: 0 3px 0 #b5c0ca, 0 6px 12px rgba(28, 37, 48, .14); }
.ix-entry-card { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 14px; padding: 32px 30px 18px; border-left: 6px solid var(--ix-k); border-top: 3px solid var(--ix-red); background: repeating-linear-gradient(to bottom, transparent 0 31px, var(--ix-ruling) 31px 32px); }
.ix-entry-title { font-family: var(--ix-display); font-size: clamp(1.9rem, 2.7vw, 2.6rem); line-height: 1.15; }
.ix-entry-link:hover .ix-entry-title { text-decoration: underline; }
.ix-entry-note { color: var(--ix-soft); line-height: 1.6; }
.ix-entry-card > .ix-hole { justify-self: center; margin-top: 6px; }
.ix-entry-link img { display: block; width: 100%; height: 100%; min-height: 340px; object-fit: cover; background: var(--ix-ruling); }

/* ---------- 分类页：侧看的一抽屉卡片 ---------- */
.ix-cat-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ix-filed-card { min-width: 0; }
.ix-filed-link { display: grid; grid-template-columns: 40px minmax(0, 1fr) 220px; align-items: stretch; background: var(--ix-card); border-top: 3px solid var(--ix-red); box-shadow: 0 2px 0 #b5c0ca; }
.ix-rod { display: grid; place-items: center; border-right: 2px dashed var(--ix-ruling); }
.ix-rod::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--ix-cabinet); box-shadow: inset 0 2px 3px rgba(28, 37, 48, .35); }
.ix-filed-text { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; padding: 14px 18px; background: repeating-linear-gradient(to bottom, transparent 0 27px, var(--ix-ruling) 27px 28px); }
.ix-filed-title { font-family: var(--ix-display); font-size: 1.35rem; line-height: 1.3; }
.ix-filed-link:hover .ix-filed-title { text-decoration: underline; }
.ix-filed-note { color: var(--ix-soft); line-height: 1.55; }
.ix-filed-link img { display: block; width: 100%; height: 100%; min-height: 138px; object-fit: cover; background: var(--ix-ruling); }
.ix-cat-list > .ix-ad { list-style: none; }
.ix-cat-list > .ix-ad:not(:has(.ad)) { display: none; }

/* ---------- 分类索引：抽屉面板墙 ---------- */
.ix-drawers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 16px; background: var(--ix-steel); }
.ix-drawer-front { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 12px; min-width: 0; padding: 22px 16px 18px; background: #c3ccd5; border-top: 6px solid var(--ix-k); box-shadow: inset 0 -3px 0 #a3afba; text-align: center; }
.ix-drawer-front .ix-holder-name { font-size: 1.1rem; }
.ix-drawer-front:hover .ix-holder-name { text-decoration: underline; }
.ix-drawer-desc { font-size: .88rem; line-height: 1.45; color: var(--ix-ink); }

/* ---------- 广告壳：无广告时塌陷 ---------- */
.ix-ad:has(.ad) { margin: 24px 0; }
.ix-ad:has(.ad) .ad { min-height: 250px; margin: 0 !important; }

/* ---------- 页脚：一格抽屉，链接是导卡标签 ---------- */
.ix-footer { margin-top: 56px; }
.ix-guides { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 6px; max-width: 1320px; margin: 0 auto; padding: 0 24px; list-style: none; }
.ix-guide { min-width: 0; }
.ix-guide a { display: block; }
.ix-guide-tab { display: block; padding: 8px 18px 6px; background: var(--ix-card); border-radius: 10px 10px 0 0; font-weight: 600; font-size: .95rem; color: #22427a; white-space: nowrap; box-shadow: inset 0 3px 0 var(--ix-red); }
.ix-guide a:hover .ix-guide-tab { text-decoration: underline; }
.ix-footer-front { display: grid; justify-items: center; gap: 14px; padding: 26px 24px 96px; background: var(--ix-steel); color: #dfe5eb; text-align: center; }
.ix-holder-foot { max-width: min(100%, 520px); }
.ix-footer-front .ix-pull { border-color: #9aa6b2; }
.ix-colophon { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }

/* ---------- 共享页面 ---------- */
.theme-catalog .site-menu, .theme-catalog .site-search, .theme-catalog .static-page, .theme-catalog .theme-error { --menu-accent: #22427a; background: #fff; }

/* ---------- 断点 ---------- */
@media (min-width: 1600px) {
    .ix-wrap, .ix-header-plate, .ix-guides { max-width: 1540px; }
    .ix-wrap-cat { max-width: 1100px; }
}

@media (max-width: 1023px) {
    .ix-index a { padding: 6px 10px; }
    .ix-entry-link { grid-template-columns: minmax(0, 1fr); }
    .ix-entry-link img { grid-row: 1; min-height: 0; height: auto; aspect-ratio: 24 / 9; }
    .ix-entry-card { padding-top: 22px; background: repeating-linear-gradient(to bottom, transparent 0 31px, var(--ix-ruling) 31px 32px); border-top: 3px solid var(--ix-red); }
    .ix-row-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ix-filed-link { grid-template-columns: 40px minmax(0, 1fr) 170px; }
}

@media (max-width: 767px) {
    .ix-header-plate { min-height: 56px; padding: 0 12px; gap: 10px; }
    .ix-header .ix-holder { padding: 3px 10px; gap: 8px; border-width: 2px; }
    .ix-header .ix-holder-name { font-size: 1.15rem; }
    .ix-menu-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; color: #fff; }
    .ix-wrap { padding: 12px 12px 0; }
    .ix-entry-link img { aspect-ratio: 16 / 9; }
    .ix-entry-card { gap: 8px; padding: 12px 14px 10px; border-left-width: 4px; }
    .ix-entry-title { font-size: 1.45rem; }
    .ix-entry-note { display: none; }
    .ix-entry-card > .ix-hole { display: none; }
    .ix-row { gap: 12px; }
    .ix-row-3, .ix-row-4 { grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
    .ix-card-link { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: 1fr; }
    .ix-card-link img { height: 100%; min-height: 96px; aspect-ratio: auto; }
    .ix-card-body { gap: 4px; padding: 8px 12px; border-top: 0; border-left: 3px solid var(--ix-red); }
    .ix-card-title { font-size: 1.02rem; }
    .ix-card-link > .ix-hole { display: none; }
    .ix-guide-head { margin-top: 28px; font-size: 1.25rem; }
    .ix-filed-link { grid-template-columns: 24px minmax(0, 1fr) 88px; }
    .ix-rod::before { width: 12px; height: 12px; }
    .ix-filed-text { gap: 4px; padding: 8px 10px; }
    .ix-filed-title { font-size: 1.02rem; }
    .ix-filed-note { display: none; }
    .ix-filed-link img { min-height: 0; height: 100%; max-height: 120px; }
    .ix-drawers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
    .ix-drawer-front { padding: 16px 8px 12px; }
    .ix-drawer-front .ix-holder { padding: 4px 8px; gap: 6px; }
    .ix-drawer-front .ix-holder-name { font-size: .95rem; }
    .ix-pull { width: 60px; height: 12px; }
    .ix-guides { padding: 0 8px; gap: 4px; }
    .ix-guide-tab { padding: 6px 10px 4px; font-size: .86rem; }
}

/* 移动端：分类导航只在 /menu 出现，隐藏规则放在全局规则之后 */
@media (max-width: 767px) {
    .ix-index { display: none; }
}
