/* ---------- detail page ---------- */
.back {
  display: inline-block; font-size: 14px; color: var(--accent);
  margin-bottom: 18px; padding: 6px 14px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--panel);
}
.back:hover { text-decoration: none; border-color: var(--accent); }

.dhero { padding: 46px 22px 24px; max-width: var(--maxw); }
.dhero-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.arxiv-chip {
  font-size: 12.5px; color: var(--cyan); border: 1px solid rgba(74,211,217,.3);
  padding: 3px 10px; border-radius: 999px; background: rgba(74,211,217,.07);
}
.arxiv-chip:hover { text-decoration: none; background: rgba(74,211,217,.14); }
.read-indicator {
  font-size: 12px; padding: 3px 12px; border-radius: 999px; cursor: pointer; user-select: none;
  color: var(--faint); border: 1px solid var(--border); background: var(--panel);
}
.read-indicator.on { color: var(--green); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.dhero h1 { font-size: clamp(24px, 3.6vw, 40px); margin: 0 0 10px; letter-spacing: -.5px; line-height: 1.25; }
.dhero h1 .zh { display: block; font-size: .62em; color: var(--muted); font-weight: 500; margin-top: 6px; }
.dblurb { color: var(--muted); font-size: 15.5px; max-width: 860px; margin: 0 0 18px; }
.dtags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }

.ptoc {
  position: sticky; top: 0; z-index: 25;
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  padding: 10px 22px; background: rgba(11,14,23,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.ptoc-label { font-size: 12px; color: var(--faint); margin-right: 6px; text-transform: uppercase; letter-spacing: .6px; }
.ptoc a { font-size: 13px; color: var(--muted); padding: 3px 10px; border-radius: 999px; }
.ptoc a:hover { color: var(--text); background: var(--panel); text-decoration: none; }

.dlayout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start;
  padding: 20px 22px 40px;
}
.dmain { padding: 0; min-width: 0; }
.side-panel {
  position: sticky; top: 62px;
  display: flex; flex-direction: column; gap: 16px;
}
.side-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.side-title { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .4px; margin-bottom: 12px; }
.read-toggle {
  width: 100%; padding: 10px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border-2); background: var(--bg-2); color: var(--amber);
}
.read-toggle:hover { border-color: var(--amber); }
.read-toggle.on { color: var(--green); border-color: rgba(74,222,128,.45); background: rgba(74,222,128,.08); }
.side-note { font-size: 12px; color: var(--faint); margin: 10px 0 0; line-height: 1.6; }
.rec-list { display: flex; flex-direction: column; gap: 8px; }
.rec-item { display: flex; gap: 10px; align-items: flex-start; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; transition: .15s; }
.rec-item:hover { border-color: var(--accent); text-decoration: none; }
.rec-rank { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; background: rgba(109,141,255,.16); color: var(--accent); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rec-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rec-title { font-size: 13.5px; color: var(--text); font-weight: 600; line-height: 1.4; }
.rec-reason { font-size: 12px; color: var(--muted); }
.rec-empty { font-size: 13px; color: var(--faint); line-height: 1.7; padding: 6px 0; }
.side-more { display: inline-block; margin-top: 12px; font-size: 12.5px; color: var(--accent); }

@media (max-width: 1000px) {
  .dlayout { grid-template-columns: 1fr; padding: 16px; }
  .side-panel { position: static; }
}
.dsec { margin-bottom: 26px; }
.dsec-h {
  font-size: 19px; font-weight: 800; margin: 0 0 12px; color: var(--text);
  padding-left: 12px; border-left: 3px solid var(--accent);
}
.dsec-b { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; }
.dsec-b p { margin: 0 0 18px; color: #d3dae8; font-size: 15.5px; line-height: 1.95; letter-spacing: .1px; }
.dsec-b p:last-child { margin-bottom: 0; }
.dsec-b ul { margin: 0 0 18px; padding-left: 22px; }
.dsec-b li { margin: 9px 0; color: #d3dae8; font-size: 15px; line-height: 1.85; }
/* 小节数量从 2 个增加到 6-8 个，需要更强的层级信号：左侧竖线 + accent 色 */
.dsec-b h3.sub {
  font-size: 15.5px; color: var(--accent); margin: 26px 0 9px; font-weight: 700;
  padding-left: 10px; border-left: 2px solid rgba(109,141,255,.45);
}
.dsec-b h3.sub:first-child { margin-top: 0; }
.dsec-b code { font-family: var(--mono); font-size: 13px; background: var(--bg-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; color: #ffd38a; }
.dsec-b .abstract { color: var(--muted); font-style: italic; font-size: 14.5px; line-height: 1.8; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 8px 0; }
.num { color: var(--amber); font-weight: 700; font-variant-numeric: tabular-nums; }

.absdetails {
  margin: 0 0 22px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 18px;
}
.absdetails summary { cursor: pointer; font-size: 13.5px; color: var(--muted); font-weight: 600; user-select: none; }
.absdetails .abstract { margin-top: 10px; font-size: 14px; color: var(--muted); font-style: italic; line-height: 1.8; }

.keydata { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 2px 0 4px; }
.kd-card {
  background: rgba(109,141,255,.06); border: 1px solid rgba(109,141,255,.18);
  border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px;
}
.kd-metric { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.kd-value { font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.kd-value .num { color: var(--accent); }
.kd-compare { font-size: 12.5px; color: var(--faint); }
.kd-compare.up { color: var(--green); }
.kd-compare.down { color: var(--red); }
.kd-compare .num { font-weight: 700; }

.rel { display: flex; flex-direction: column; gap: 8px; }
.rel-item {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; transition: .15s;
}
.rel-item:hover { border-color: var(--accent); text-decoration: none; }
.rel-title { font-size: 15px; color: var(--text); font-weight: 600; }
.rel-note { font-size: 13px; color: var(--muted); }

.pager { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 16px 0 4px; }
.pg {
  font-size: 13.5px; color: var(--muted); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px; background: var(--panel); max-width: 46%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pg:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.pg.dim { opacity: .45; cursor: default; }
.pg-pos { font-size: 13px; color: var(--faint); }
footer .footnote { font-size: 12.5px; color: var(--faint); text-align: center; margin-top: 14px; }

@media (max-width: 640px) {
  .dsec-b { padding: 16px; }
  .pager { gap: 8px; }
  .pg { max-width: 100%; }
}
