/* ==========================================================================
   级差学习
   ========================================================================== */
.jicha-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.jicha-side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.jicha-search { padding: 10px; border-bottom: 1px solid var(--line-soft); }
.jicha-search .input { width: 100%; font-size: 12.5px; padding: 7px 10px; }

.jicha-layer { border-bottom: 1px solid var(--line-soft); }
.jicha-layer:last-child { border-bottom: none; }
.jicha-layer-head {
  padding: 9px 12px;
  background: var(--card-2);
  font-size: 13px;
  font-weight: 650;
  color: var(--blue-d);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.jicha-layer-head:hover { background: var(--blue-bg); }
.jicha-layer-head .muted { font-weight: 400; font-size: 11px; }

.cp-list { display: none; }
.jicha-layer.open .cp-list { display: block; }
.cp-item {
  padding: 7px 12px 7px 20px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-2);
  border-left: 3px solid transparent;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.cp-item:hover { background: var(--card-2); }
.cp-item.active {
  background: var(--blue-bg);
  color: var(--blue-d);
  border-left-color: var(--blue);
  font-weight: 600;
}

.jicha-main { min-height: 420px; }

.cp-title {
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.cp-title small { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.cp-empty { color: var(--muted); font-style: italic; padding: 40px 0; text-align: center; }

.diff-table th { background: var(--th-bg); color: var(--ink); }
.diff-table td.diff-hl { background: var(--hl-bg) !important; }

@media (max-width: 900px) {
  .jicha-layout { grid-template-columns: 1fr; }
  .jicha-side { position: static; max-height: 42vh; }
}
