/* 中文用系统字体，不下载网页字体（大陆访问速度、无额外许可）；代码等宽 */
body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  line-height: 1.75;
}
code, pre { font-family: "JetBrains Mono", Consolas, "Courier New", monospace; }

/* 详情页顶部的元信息卡片 */
.fig-meta { border: 1px solid #dee2e6; border-radius: 8px; padding: 0.8rem 1rem; margin: 1rem 0; background: #f8f9fa; }
.fig-meta dt { font-weight: 600; float: left; clear: left; width: 7.5em; }
.fig-meta dd { margin-left: 8em; margin-bottom: 0.2rem; }

/* 复现等级徽标 */
.level { display: inline-block; padding: 0 0.5em; border-radius: 4px; font-weight: 600; font-size: 0.9em; }
.level-L1 { background: #e9ecef; } .level-L1p { background: #fff3cd; }
.level-L2 { background: #d1e7dd; } .level-L2R { background: #cfe2ff; } .level-L3 { background: #b6effb; }

/* 图片预览：白底、不裁剪 */
.fig-preview img { max-width: 100%; border: 1px solid #dee2e6; border-radius: 6px; background: #fff; }

/* 列表网格卡片：同一行卡片等高，字段表固定贴底，标题一行或两行都对齐 */
/* Quarto 自带 post-contents{height:100%} 会让正文区超出卡片、标题被压缩重叠，这里改为占满“图片以下”的剩余高度 */
.quarto-grid-link { display: block; height: 100%; }
.quarto-grid-item.card { display: flex; flex-direction: column; height: 100%; }
.quarto-grid-item div.post-contents { height: auto; flex: 1 0 auto; display: flex; flex-direction: column; }
.quarto-grid-item div.post-contents > * { flex-shrink: 0; }
.quarto-grid-item .card-other-values { margin-top: auto; padding-top: 0.5em; }
/* 缩略图完整显示整张图，不裁剪 */
.quarto-grid-item p.card-img-top > img.thumbnail-image { object-fit: contain; background: #fff; padding: 6px; }

/* 详情页原文出处一行 */
.fig-source { color: #495057; font-size: 0.92em; margin: 0.4rem 0 1.2rem; }

/* 下载区 */
.downloads td, .downloads th { padding: 0.3rem 0.6rem; }
.sha { font-family: Consolas, monospace; font-size: 0.8em; color: #6c757d; word-break: break-all; }

/* 首页以图和两个内容入口为主，沿用全站的蓝白配色。 */
.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin: 1.8rem 0 2.4rem; }
.entry-card { position: relative; border: 1px solid #d7e3ef; border-top: 4px solid #2780e3; border-radius: 8px; padding: 1.3rem; background: #f5f9fd; }
.entry-card h3 { margin-top: 0; }
.entry-card h3 a { text-decoration: none; }
.entry-card p:last-child { color: #1d65af; margin-bottom: 0; }
.entry-card:focus-within { outline: 2px solid #2780e3; outline-offset: 3px; }
.download-button { margin-bottom: 1rem; }
.contact-qr { max-width: 100%; height: auto; }
.navbar-logo { width: 230px; height: 34px; max-height: none; object-fit: contain; }
.navbar-brand-container > .navbar-brand:not(.navbar-brand-logo) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav-search { width: 16rem; order: 3; margin-left: 1rem; color: #212529; --pf-font-size: 0.9rem; }
.nav-search .pf-searchbox-dropdown { min-width: min(28rem, calc(100vw - 2rem)); right: 0; left: auto; }
.nav-footer { padding: 0.7rem 1rem; min-height: 0; font-size: 0.85rem; }

@media (max-width: 991.98px) {
  .nav-search { width: 100%; order: 2; margin: 0.5rem 0 0; }
  .navbar-collapse { order: 3; }
}
@media (max-width: 575.98px) {
  .navbar-logo { width: 200px; }
  .quarto-listing .quarto-listing-cols-3,
  .quarto-listing .quarto-listing-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .quarto-grid-item p.card-img-top > img.thumbnail-image { height: 115px !important; padding: 3px; }
  .quarto-grid-item .card-title { font-size: 0.9rem; line-height: 1.4; }
  .quarto-grid-item div.post-contents { padding: 0.65rem; }
  .quarto-grid-item .card-other-values { font-size: 0.75rem; }
  .entry-grid { gap: 0.65rem; margin: 1.2rem 0 1.8rem; }
  .entry-card { padding: 0.9rem; }
  .entry-card h3 { font-size: 1.2rem; }
  .entry-card p { font-size: 0.85rem; }
  .nav-footer { flex-direction: row; flex-wrap: wrap; gap: 0.3rem; }
}

/* 首页V2：只作用于首页，不覆盖其他页面的导航与内容样式。 */
.home-v2-page #title-block-header{display:none}
.home-v2-page #quarto-content{display:block;padding:0}
.home-v2-page main.content{display:block;width:100%;max-width:none;margin:0;padding:0}
.home-v2{
  --blue:#2780e3; --blue-d:#1a5fa8; --ink:#14273d; --body:#3d4f63; --muted:#6b7b8e;
  --line:#e3e9f0; --paper:#fbfcfe; --wash:#f2f7fd;
color:var(--body)}
.home-v2 a{color:inherit;text-decoration:none}
.home-v2 a:focus-visible,.home-v2 summary:focus-visible{outline:3px solid var(--blue);outline-offset:3px;border-radius:4px}
.home-v2-shell{width:min(1160px,calc(100% - 64px));margin:0 auto}
.home-v2 .home-v2-card h2{border:0;padding:0}
.home-v2-page .nav-footer{margin-top:34px;border-top:1px solid #e3e9f0}

.home-v2-hero{background:
  linear-gradient(180deg,rgba(255,255,255,0) 60%,#fff 100%),
  linear-gradient(#eef3f9 1px,transparent 1px) 0 0/28px 28px,
  linear-gradient(90deg,#eef3f9 1px,transparent 1px) 0 0/28px 28px;
  border-bottom:1px solid var(--line)}
.home-v2-hero-in{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:56px;padding:56px 0 56px;align-items:stretch}
/* 左右等高：右侧资源卡上沿对齐左侧标签、下沿对齐左侧末行，两张入口卡均分高度 */
.home-v2-copy{display:flex;flex-direction:column}
.home-v2-copy .home-v2-fine{margin-bottom:0}

.home-v2-tag{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--blue-d);background:#fff;border:1px solid #cfe0f3;border-radius:999px;padding:3px 12px 3px 10px}
.home-v2-tag b{width:7px;height:7px;border-radius:50%;background:#2fb37a;display:inline-block}
.home-v2 h1{font-size:40px;line-height:1.3;color:var(--ink);margin:18px 0 14px;letter-spacing:-1px;font-weight:800}
.home-v2-lead{font-size:17px;line-height:1.85;margin:0 0 26px;max-width:520px;color:var(--body)}
.home-v2-lead em{font-style:normal;color:var(--ink);font-weight:600;background:linear-gradient(transparent 62%,#d9e9fb 62%)}

/* 三条主线 */
.home-v2-lines{list-style:none;margin:0 0 26px;padding:0;border-top:1px solid var(--line);max-width:600px}
.home-v2-lines li{display:grid;grid-template-columns:44px 104px 1fr;align-items:baseline;gap:4px 10px;padding:13px 0;border-bottom:1px solid var(--line)}
.home-v2-lines .home-v2-n{font:600 13px/1 "JetBrains Mono",Consolas,monospace;color:var(--blue)}
.home-v2-lines h3{margin:0;font-size:17px;color:var(--ink)}
.home-v2-lines p{margin:0;font-size:14.5px;color:var(--muted)}

.home-v2-cta-row{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.home-v2 a.home-v2-btn{display:inline-flex;align-items:center;gap:10px;background:var(--ink);color:#fff;font-weight:600;font-size:15px;padding:12px 22px;border-radius:9px;box-shadow:0 6px 18px -8px rgba(20,39,61,.55)}
.home-v2-btn:hover{background:#0b1a2b}
.home-v2-handle{font-size:14px;color:var(--muted)}
.home-v2-handle b{color:var(--ink);font-weight:600;font-family:"JetBrains Mono",Consolas,monospace;font-size:13.5px}
.home-v2-fine{margin:16px 0 0;font-size:13px;color:var(--muted);max-width:600px}

/* 右侧：免费资源 */
.home-v2-res{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 40px -28px rgba(20,39,61,.35);overflow:hidden}
.home-v2-res-h{display:flex;justify-content:space-between;align-items:baseline;padding:16px 20px 4px}
.home-v2-res-h strong{color:var(--ink);font-size:15px}
.home-v2-res-h span{font-size:12.5px;color:var(--muted)}
.home-v2-card{flex:1 1 0;display:flex;flex-direction:column;justify-content:center;padding:14px 20px 18px;border-top:1px solid var(--line)}
.home-v2-card:first-of-type{border-top:0}
.home-v2-card:hover{background:var(--paper)}
.home-v2-card-t{display:flex;justify-content:space-between;align-items:center;margin-bottom:2px}
.home-v2-card h2{margin:0;font-size:18px;color:var(--ink)}
.home-v2-card .home-v2-go{color:var(--blue);font-size:14px;font-weight:600;white-space:nowrap}
.home-v2-card p{margin:0 0 12px;font-size:13.5px;color:var(--muted)}
.home-v2-thumbs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.home-v2-thumbs img{width:100%;aspect-ratio:4/3;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:7px;padding:4px}

/* 完整说明 */
.home-v2-more{padding:30px 0 8px}
.home-v2-more details{border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:16px 22px}
.home-v2-more summary{cursor:pointer;font-weight:600;color:var(--ink);list-style:none;display:flex;justify-content:space-between;align-items:center}
.home-v2-more summary::-webkit-details-marker{display:none}
.home-v2-more summary:after{content:"展开 ＋";font-weight:500;font-size:13px;color:var(--blue)}
.home-v2-more details[open] summary:after{content:"收起 －"}
.home-v2-more details p{margin:12px 0 4px;font-size:14.5px;line-height:1.95}
.home-v2-more details ul{margin:6px 0 0;padding-left:1.2em;font-size:14px;color:var(--muted)}



@media (max-width:760px){
  .home-v2-shell{width:calc(100% - 36px)}
  .home-v2-hero-in{grid-template-columns:1fr;gap:28px;padding:26px 0 30px}
  .home-v2-tag{font-size:12.5px;align-self:flex-start}
  .home-v2-dbr{display:none}
  .home-v2 h1{font-size:29px;line-height:1.35;margin:14px 0 10px;letter-spacing:-.6px}
  .home-v2-lead{font-size:15.5px;line-height:1.85;margin-bottom:18px}
  /* 手机上联系入口提前：紧跟导语 */
  .home-v2-copy{display:flex;flex-direction:column}
  .home-v2-cta-row{order:3;flex-direction:column;align-items:stretch;gap:10px;margin-bottom:22px}
  .home-v2 a.home-v2-btn{justify-content:center;padding:13px 18px;font-size:16px}
  .home-v2-handle{text-align:center;font-size:13.5px}
  .home-v2-lines{order:4;margin-bottom:0}
  .home-v2-lines li{grid-template-columns:34px 1fr;padding:12px 0}
  .home-v2-lines p{grid-column:2;font-size:14px;line-height:1.75}
  .home-v2-lines h3{font-size:16.5px}
  .home-v2-fine{order:5;font-size:13px;line-height:1.8}
  .home-v2-res{border-radius:12px}
  .home-v2-res-h{padding:14px 16px 2px}
  .home-v2-card{flex:none;padding:12px 16px 16px}
  .home-v2-card h2{font-size:17px}
  .home-v2-card p{font-size:13px;margin-bottom:10px}
  .home-v2-thumbs{gap:6px}
  .home-v2-more{padding-top:22px}
  .home-v2-more details{padding:14px 16px}
  .home-v2-more details p{font-size:14px}
}
